Skip to content
This repository was archived by the owner on Nov 16, 2024. It is now read-only.

Commit c9e58f2

Browse files
authored
Merge pull request #8 from mmmmmob/fixes
fix: NowPlaying width overflow
2 parents 198aa63 + ea32819 commit c9e58f2

File tree

5 files changed

+47
-37
lines changed

5 files changed

+47
-37
lines changed

.eslintrc.cjs

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,21 @@ module.exports = {
22
root: true,
33
env: { browser: true, es2020: true },
44
extends: [
5-
'eslint:recommended',
6-
'plugin:react/recommended',
7-
'plugin:react/jsx-runtime',
8-
'plugin:react-hooks/recommended',
5+
"eslint:recommended",
6+
"plugin:react/recommended",
7+
"plugin:react/jsx-runtime",
8+
"plugin:react-hooks/recommended",
99
],
10-
ignorePatterns: ['dist', '.eslintrc.cjs'],
11-
parserOptions: { ecmaVersion: 'latest', sourceType: 'module' },
12-
settings: { react: { version: '18.2' } },
13-
plugins: ['react-refresh'],
10+
ignorePatterns: ["dist", ".eslintrc.cjs"],
11+
parserOptions: { ecmaVersion: "latest", sourceType: "module" },
12+
settings: { react: { version: "18.2" } },
13+
plugins: ["react-refresh"],
1414
rules: {
15-
'react/jsx-no-target-blank': 'off',
16-
'react-refresh/only-export-components': [
17-
'warn',
15+
"react/jsx-no-target-blank": "off",
16+
"react-refresh/only-export-components": [
17+
"warn",
1818
{ allowConstantExport: true },
1919
],
20+
"react/prop-types": "off",
2021
},
21-
}
22+
};

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,11 @@ Ensure you have the following tools installed:
4141

4242
### Installation
4343

44-
1. Clone the repository:
44+
1. Clone or create your own respository from template:
4545

4646
```sh
47-
git clone https://github.com/mmmmmob/me.theppitak.git
48-
cd me.theppitak
47+
git clone https://github.com/mmmmmob/www.git
48+
cd www
4949
```
5050

5151
2. Install dependencies using Bun:

bun.lockb

14.2 KB
Binary file not shown.

package.json

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "me.theppitak",
33
"private": true,
4-
"version": "1.0.0",
4+
"version": "1.0.1",
55
"type": "module",
66
"scripts": {
77
"dev": "vite",
@@ -11,30 +11,32 @@
1111
},
1212
"dependencies": {
1313
"@vercel/analytics": "^1.3.1",
14-
"@vercel/speed-insights": "^1.0.11",
15-
"react": "^18.2.0",
16-
"react-dom": "^18.2.0"
14+
"@vercel/speed-insights": "^1.0.12",
15+
"react": "^18.3.1",
16+
"react-dom": "^18.3.1"
1717
},
1818
"devDependencies": {
1919
"@tailwindcss/typography": "^0.5.13",
20-
"@types/react": "^18.2.66",
21-
"@types/react-dom": "^18.2.22",
22-
"@vitejs/plugin-react": "^4.2.1",
20+
"@types/react": "^18.3.3",
21+
"@types/react-dom": "^18.3.0",
22+
"@vitejs/plugin-react": "^4.3.1",
2323
"autoprefixer": "^10.4.19",
2424
"daisyui": "^4.12.2",
25-
"eslint": "^8.57.0",
26-
"eslint-plugin-react": "^7.34.1",
27-
"eslint-plugin-react-hooks": "^4.6.0",
28-
"eslint-plugin-react-refresh": "^0.4.6",
25+
"eslint": "^9.5.0",
26+
"eslint-plugin-react": "^7.34.2",
27+
"eslint-plugin-react-hooks": "^4.6.2",
28+
"eslint-plugin-react-refresh": "^0.4.7",
2929
"postcss": "^8.4.38",
30-
"prettier": "^3.3.1",
31-
"prettier-plugin-tailwindcss": "^0.6.2",
30+
"prettier": "^3.3.2",
31+
"prettier-plugin-tailwindcss": "^0.6.4",
3232
"react-icons": "^5.2.1",
3333
"tailwindcss": "^3.4.4",
34-
"vite": "^5.2.0",
34+
"vite": "^5.3.1",
3535
"vite-plugin-node-polyfills": "^0.22.0"
3636
},
3737
"prettier": {
38-
"plugins": ["prettier-plugin-tailwindcss"]
38+
"plugins": [
39+
"prettier-plugin-tailwindcss"
40+
]
3941
}
4042
}

src/components/NowPlaying.jsx

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export const NowPlaying = (props) => {
2626
useEffect(() => {
2727
const intervalId = setInterval(() => {
2828
fetchNowPlaying();
29-
}, 30000);
29+
}, 45000);
3030

3131
return () => clearInterval(intervalId);
3232
}, []);
@@ -38,8 +38,8 @@ export const NowPlaying = (props) => {
3838
)}
3939
{!loading && !isPlaying && (
4040
<div className="my-2 flex w-fit self-center truncate">
41-
<div className="mx-1 self-center">
42-
<BiSolidBarChartAlt2 size={20} />
41+
<div className="self-center">
42+
<BiSolidBarChartAlt2 size={20} className="mx-1" />
4343
</div>
4444
<p className="w-fit self-end text-xs">Currently Offline</p>
4545
</div>
@@ -52,17 +52,24 @@ export const NowPlaying = (props) => {
5252
</p>
5353
</div>
5454
<div className="flex self-center">
55-
<BiSolidBarChartAlt2 size={18} />
55+
<BiSolidBarChartAlt2 size={18} className="mx-1" />
5656
<img
5757
src={result.albumImageUrl}
5858
alt={`${result.title} album art`}
5959
className="mx-1 size-5 self-end rounded-md"
6060
/>
61-
<div className="flex self-center truncate text-xs font-bold">
62-
<a href={result.songUrl} target="_blank" className="min-md:w-40">
61+
<div className="min-md:w-40 flex self-center text-xs font-bold">
62+
<a
63+
href={result.songUrl}
64+
target="_blank"
65+
className="mx-1 overflow-x-scroll text-center max-md:max-w-44"
66+
>
6367
{result.title}
6468
</a>
65-
<p className="ml-1 truncate font-medium">{result.artist}</p>
69+
<p className="mx-1"></p>
70+
<p className="ml-1 truncate text-center font-medium max-md:max-w-36">
71+
{result.artist}
72+
</p>
6673
</div>
6774
</div>
6875
</div>

0 commit comments

Comments
 (0)