-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Some clean up, added Spotify icon for offline/loading state * Minor clean up in Mobile view * Updating about text. * Fixing max width for the Tab Panel * P-18: fixed bug when type is not track * P-20: Add real time spotify streaming progress bar. (#21) * P-23: Added experience section. (#24) * P-26: Added placeholder projects section. (#27) * Wip footer. * develop: some footer updates, brb. * develop: simple footer. * P-11 (#31) * P-11: added vitest, react testing library config for unit testing. * P-11: add Projects unit test. * P-11: fix bg card color. * P-11 (#32) * P-11: added vitest, react testing library config for unit testing. * P-11: add Projects unit test. * P-11: fix bg card color. * P-11: almost done, missing Github actions and TODOS in test. * Update src/components/Navigation/Navigation.test.tsx * theme-mode: add dark/light mode. (#38) * animation: add simple typing animation and set initial theme mode based on user system pref. (#41) * cloudinary: replace png images, missing svgs (#44)
- Loading branch information
1 parent
3d8464b
commit 971e448
Showing
11 changed files
with
127 additions
and
27 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Binary file not shown.
Binary file not shown.
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 { getCloudinaryUrl } from "../services/cloudinary"; | ||
|
||
type CloudinaryImageProps = { | ||
publicId: string; | ||
alt: string; | ||
options?: Record<string, unknown>; | ||
className?: string; | ||
}; | ||
|
||
export default function CloudinaryImage({ | ||
publicId, | ||
alt, | ||
options, | ||
className, | ||
}: CloudinaryImageProps) { | ||
const imageUrl = getCloudinaryUrl(publicId, options); | ||
return <img src={imageUrl} alt={alt} className={className} />; | ||
} |
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,7 +1,10 @@ | ||
export const CLIENT_ID = import.meta.env.VITE_APP_SPOTIFY_CLIENT_ID; | ||
export const CLIENT_SECRET = import.meta.env.VITE_APP_SPOTIFY_CLIENT_SECRET; | ||
export const REFRESH_TOKEN = import.meta.env.VITE_APP_SPOTIFY_REFRESH_TOKEN; | ||
export const ENV = import.meta.env.VITE_APP_NODE_ENV; | ||
export const TOKEN_ENDPOINT = "https://accounts.spotify.com/api/token"; | ||
export const NOW_PLAYING_ENDPOINT = | ||
"https://api.spotify.com/v1/me/player/currently-playing"; | ||
export const config = { | ||
CLIENT_ID: import.meta.env.VITE_APP_SPOTIFY_CLIENT_ID, | ||
CLIENT_SECRET: import.meta.env.VITE_APP_SPOTIFY_CLIENT_SECRET, | ||
REFRESH_TOKEN: import.meta.env.VITE_APP_SPOTIFY_REFRESH_TOKEN, | ||
ENV: import.meta.env.VITE_APP_NODE_ENV, | ||
CLOUD_NAME: import.meta.env.VITE_APP_CLOUD_NAME, | ||
TOKEN_ENDPOINT: "https://accounts.spotify.com/api/token", | ||
NOW_PLAYING_ENDPOINT: | ||
"https://api.spotify.com/v1/me/player/currently-playing", | ||
}; |
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,24 @@ | ||
import { buildUrl } from "cloudinary-build-url"; | ||
import { config } from "../config"; | ||
|
||
type TransformationOptions = { | ||
[key: string]: unknown; | ||
}; | ||
|
||
export function getCloudinaryUrl( | ||
publicId: string, | ||
options?: TransformationOptions | ||
): string { | ||
if (!config.CLOUD_NAME) { | ||
throw new Error( | ||
"Cloudinary cloud name is required to compose the image url." | ||
); | ||
} | ||
|
||
return buildUrl(publicId, { | ||
cloud: { | ||
cloudName: config.CLOUD_NAME, | ||
}, | ||
transformations: options, | ||
}); | ||
} |
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