-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0207bf4
commit cc954b1
Showing
54 changed files
with
1,957 additions
and
1,967 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,55 +1,47 @@ | ||
import { | ||
SelectContent, | ||
SelectItem, | ||
SelectLabel, | ||
SelectRoot, | ||
SelectTrigger, | ||
SelectValueText, | ||
SelectContent, | ||
SelectItem, | ||
SelectLabel, | ||
SelectRoot, | ||
SelectTrigger, | ||
SelectValueText, | ||
} from "@/components/ui/select"; | ||
import i18n from "@/i18n"; | ||
import { createListCollection, useRecipe } from "@chakra-ui/react" | ||
import { createListCollection } from "@chakra-ui/react" | ||
export default function ProfileSettings () { | ||
const supportedLangs =createListCollection({ | ||
items: [ | ||
{label: 'English', value: 'en'} | ||
] | ||
}); | ||
const supportedLangs =createListCollection({ | ||
items: [ | ||
{label: 'English', value: 'en'} | ||
] | ||
}); | ||
|
||
|
||
const langChangeHandler = (input) => { | ||
const tag = input.value[0]; | ||
i18n.changeLanguage(tag); | ||
const langChangeHandler = (input) => { | ||
const tag = input.value[0]; | ||
i18n.changeLanguage(tag); | ||
|
||
} | ||
} | ||
return ( | ||
<div className="rounded-xl w-[95vw] grid gap-8 text-primary-white | ||
self-center my-5 p-10 bg-primary-darkForeground"> | ||
<h2 className="font-extrabold text-xl ">Profile settings</h2> | ||
<div className="flex flex-row gap-14 flex-wrap"> | ||
<div className="grid grid-flow-row gap-3"> | ||
<SelectRoot onValueChange={langChangeHandler} width='100px' collection={supportedLangs}> | ||
<SelectLabel className="font-extrabold">Language </SelectLabel> | ||
<SelectTrigger className="border-2 px-1 rounded-md border-primary-mutedForeground"> | ||
<SelectValueText placeholder="Select Language" /> | ||
</SelectTrigger> | ||
<SelectContent className="border-2 border-red-900" border='Highlight' > | ||
{supportedLangs.items.map((lang) => ( | ||
<SelectItem item={lang} key={lang.value}> | ||
{lang.label} | ||
</SelectItem> | ||
))} | ||
</SelectContent> | ||
</SelectRoot> | ||
<SelectRoot onValueChange={langChangeHandler} width='100px' collection={supportedLangs}> | ||
<SelectLabel className="font-extrabold">Language </SelectLabel> | ||
<SelectTrigger className="border-2 px-1 rounded-md border-primary-mutedForeground"> | ||
<SelectValueText placeholder="Select Language" /> | ||
</SelectTrigger> | ||
<SelectContent className="border-2 border-red-900" border='Highlight' > | ||
{supportedLangs.items.map((lang) => ( | ||
<SelectItem item={lang} key={lang.value}> | ||
{lang.label} | ||
</SelectItem> | ||
))} | ||
</SelectContent> | ||
</SelectRoot> | ||
</div> | ||
</div> | ||
</div> | ||
) | ||
} | ||
|
||
const Select = ({children, onchangefunc} : any) => ( | ||
<select onChange={onchangefunc} className="bg-transparent border-accent-500 border-2 rounded-lg px-5 py-1"> | ||
{children} | ||
</select> | ||
) | ||
|
||
//im writing type to any temporarily, until we use a cmpnt library |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.