{ "memory": [ [ "Human:: Document the following code: In order to implement the signup system in TypeScript using Supabase based on the provided algorithmic pseudocode and codebase, we need to follow these steps:\n\n1. Import necessary modules and dependencies.\n2. Implement the `useEffect` hook to check if a user is already authenticated when the `MainPanel` component renders.\n3. Define a function `handleFormSubmit` to handle form submission.\n4. Implement the form for user signup in the `UpperPanel` component.\n5. Implement the `LowerPanel` component which will display a message or instructions based on `promptInstruction` state.\n\nLet's start by importing the necessary modules and dependencies. \n\n```typescript\nimport React, { useState, useEffect } from 'react';\nimport { Auth } from '@supabase/ui';\nimport { supabase } from './supabaseClient';\nimport UpperPanel from './UpperPanel';\nimport LowerPanel from './LowerPanel';\n```\n\nNext, we'll add the `useEffect` hook inside the `MainPanel` component to check if a user is already authenticated when the component renders. If a user is found, we'll update the `user` state with the returned user.\n\n```typescript\nconst MainPanel = () => {\n const [user, setUser] = useState(null);\n const [promptInstructionForLowerPanel, setPromptInstructionForLowerPanel] = useState(''); \n const [formData, setFormData] = useState('');\n const [isLoading, setIsLoading] = useState(false); \n\n useEffect(() => {\n const user = supabase.auth.user();\n if (user) {\n setUser(user);\n }\n }, []);\n\n return (\n