Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Framework7 & other stuff #4

Merged
merged 25 commits into from
Apr 7, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
refactoring & fixing links
  • Loading branch information
damienmauchamp committed Apr 3, 2024
commit 527296e3e754abee4e2577afb81400bb86b665f8
6 changes: 3 additions & 3 deletions app/f7/page.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use client'
// import F7ReleasesPage from '@/src/components/Pages/F7/F7ReleasePage'
import { useEffect, useState } from 'react'
import { useEffect } from 'react'

//
import 'framework7/css/bundle'
Expand Down Expand Up @@ -29,11 +29,11 @@ const f7params = {
}

const F7HomePage = () => {
const [ready, setReady] = useState<any>(false)
// const [ready, setReady] = useState<any>(false)

useEffect(() => {
f7ready((f7) => {
setReady(true)
// setReady(true)

console.log('HOME f7 ready', f7)

Expand Down
9 changes: 9 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions src/components/CollectionItems/Albums/Album.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {
isMobile,
} from 'react-device-detect'
import { IoCheckmarkCircle } from 'react-icons/io5'
import Link from '../../Components/Link'

interface AlbumProps extends React.HTMLAttributes<HTMLDivElement>, Album {}

Expand Down Expand Up @@ -68,7 +69,7 @@ const AlbumComponent = ({
data-m={Number(isMobile)}
// key={identifier}
>
<a
<Link
className={styles.album}
target="_blank"
href={`https://music.apple.com/${process.env.STOREFRONT}/album/${storeId}`}
Expand Down Expand Up @@ -134,7 +135,7 @@ const AlbumComponent = ({
</div>
<div className={styles.artistName}>{artistName}</div>
</div>
</a>
</Link>
</div>
)
}
Expand Down
7 changes: 4 additions & 3 deletions src/components/CollectionItems/Songs/Songs/Song.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import Image from 'next/image'
import styles from './Song.module.css'
import ContentRating from '@/src/components/Elements/ContentRating/ContentRating'
import { Artist, Song } from '@/types/Items'
import Link from '@/src/components/Components/Link'

interface SongProps extends React.HTMLAttributes<HTMLDivElement>, Song {
selected?: boolean
Expand Down Expand Up @@ -67,7 +68,7 @@ const SongComponent = ({
<div className={styles.artworkNameContainer}>
<div className="flex">
<a
className={styles.artworkContainer}
className={`external ${styles.artworkContainer}`}
target="_blank"
href={songLink}
>
Expand Down Expand Up @@ -108,13 +109,13 @@ const SongComponent = ({
</div>
<div className={styles.albumNameCell}>
<div className={styles.albumName}>
<a
<Link
// className={styles.artworkContainer}
target="_blank"
href={albumId ? albumLink : '#'}
>
{albumName}
</a>
</Link>
</div>
</div>
<div className={styles.durationCell}>
Expand Down
14 changes: 14 additions & 0 deletions src/components/Components/Link.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import React from 'react'

// export interface LinkProps extends React.HTMLAttributes<HTMLAnchorElement> {}
export interface LinkProps
extends React.DetailedHTMLProps<
React.AnchorHTMLAttributes<HTMLAnchorElement>,
HTMLAnchorElement
> {}

const Link = ({ className = '', ...props }: LinkProps) => {
return <a className={`external ${className}`} {...props} />
}

export default Link
2 changes: 1 addition & 1 deletion src/components/Pages/User/ReleasesPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export default function ReleasesPage({ ...props }: ReleasesPageProps) {

// Auth hook
const { user, isLoading, hasTestToken } = useAuth({
middleware: 'auth',
// middleware: 'auth',
}) // todo : redirect to previous page after login

// State
Expand Down