-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #531 from omnifed/526-feat-update-usetheme-context…
…-to-use-new-theme-selector 526 feat update usetheme context to use new theme selector
- Loading branch information
Showing
20 changed files
with
524 additions
and
101 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
'use server' | ||
|
||
import { cookies } from 'next/headers' | ||
|
||
export async function getCookie(cName: string) { | ||
return cookies().get(cName)?.value ?? '' | ||
} | ||
|
||
export async function setCookie(cName: string, cValue: any) { | ||
let date = new Date() | ||
date.setTime(date.getTime() + 7 * 24 * 60 * 60 * 1000) | ||
cookies().set(cName, cValue, { expires: date }) | ||
} | ||
|
||
export async function deleteCookie(cName: string) { | ||
cookies().delete(cName) | ||
} |
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
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 |
---|---|---|
@@ -0,0 +1,60 @@ | ||
import { type SVGProps } from 'react' | ||
|
||
export function AnimatingSystemIcon(props: SVGProps<SVGSVGElement>) { | ||
return ( | ||
<svg | ||
xmlns="http://www.w3.org/2000/svg" | ||
width="1.5em" | ||
height="1.5em" | ||
viewBox="0 0 24 24" | ||
{...props} | ||
> | ||
<g | ||
fill="none" | ||
stroke="currentColor" | ||
strokeLinecap="round" | ||
strokeLinejoin="round" | ||
strokeWidth={2} | ||
> | ||
<path strokeDasharray={6} strokeDashoffset={6} d="M12 21h5M12 21h-5"> | ||
<animate | ||
fill="freeze" | ||
attributeName="stroke-dashoffset" | ||
dur="0.225s" | ||
values="6;0" | ||
></animate> | ||
</path> | ||
<path strokeDasharray={6} strokeDashoffset={6} d="M12 21v-4"> | ||
<animate | ||
fill="freeze" | ||
attributeName="stroke-dashoffset" | ||
dur="0.225s" | ||
values="6;0" | ||
></animate> | ||
</path> | ||
<path | ||
fill="currentColor" | ||
fillOpacity={0} | ||
strokeDasharray={64} | ||
strokeDashoffset={64} | ||
d="M12 17h-9v-12h18v12Z" | ||
> | ||
<animate | ||
fill="freeze" | ||
attributeName="fill-opacity" | ||
begin="0.75s" | ||
dur="0.112s" | ||
values="0;0.3" | ||
></animate> | ||
<animate | ||
fill="freeze" | ||
attributeName="stroke-dashoffset" | ||
begin="0.225s" | ||
dur="0.45s" | ||
values="64;0" | ||
></animate> | ||
</path> | ||
</g> | ||
</svg> | ||
) | ||
} |
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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { type SVGProps } from 'react' | ||
|
||
export function DogIcon(props: SVGProps<SVGSVGElement>) { | ||
return ( | ||
<svg | ||
xmlns="http://www.w3.org/2000/svg" | ||
width="1em" | ||
height="1em" | ||
viewBox="0 0 512 512" | ||
{...props} | ||
> | ||
<path | ||
fill="currentColor" | ||
d="M269.4 2.9C265.2 1 260.7 0 256 0s-9.2 1-13.4 2.9L54.3 82.8c-22 9.3-38.4 31-38.3 57.2c.5 99.2 41.3 280.7 213.6 363.2c16.7 8 36.1 8 52.8 0C454.7 420.7 495.5 239.2 496 140c.1-26.2-16.3-47.9-38.3-57.2zM160.9 286.2c4.8 1.2 9.9 1.8 15.1 1.8c35.3 0 64-28.7 64-64v-64h44.2c12.1 0 23.2 6.8 28.6 17.7L320 192h64c8.8 0 16 7.2 16 16v32c0 44.2-35.8 80-80 80h-48v50.7c0 7.3-5.9 13.3-13.3 13.3c-1.8 0-3.6-.4-5.2-1.1l-98.7-42.3c-6.6-2.8-10.8-9.3-10.8-16.4c0-2.8.6-5.5 1.9-8zM160 160h48v64c0 17.7-14.3 32-32 32s-32-14.3-32-32v-48c0-8.8 7.2-16 16-16m128 48a16 16 0 1 0-32 0a16 16 0 1 0 32 0" | ||
></path> | ||
</svg> | ||
) | ||
} |
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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { type SVGProps } from 'react' | ||
|
||
export function FireIcon(props: SVGProps<SVGSVGElement>) { | ||
return ( | ||
<svg | ||
xmlns="http://www.w3.org/2000/svg" | ||
width="1em" | ||
height="1em" | ||
viewBox="0 0 16 16" | ||
{...props} | ||
> | ||
<path | ||
fill="currentColor" | ||
d="M8 16c3.314 0 6-2 6-5.5c0-1.5-.5-4-2.5-6c.25 1.5-1.25 2-1.25 2C11 4 9 .5 6 0c.357 2 .5 4-2 6c-1.25 1-2 2.729-2 4.5C2 14 4.686 16 8 16m0-1c-1.657 0-3-1-3-2.75c0-.75.25-2 1.25-3C6.125 10 7 10.5 7 10.5c-.375-1.25.5-3.25 2-3.5c-.179 1-.25 2 1 3c.625.5 1 1.364 1 2.25C11 14 9.657 15 8 15" | ||
></path> | ||
</svg> | ||
) | ||
} |
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.