Skip to content

Commit

Permalink
命名修正、key修正等
Browse files Browse the repository at this point in the history
  • Loading branch information
shari-sushi committed Jan 13, 2025
1 parent b93d607 commit 39dd623
Show file tree
Hide file tree
Showing 5 changed files with 91 additions and 93 deletions.
4 changes: 2 additions & 2 deletions t0016Next/myapp/src/components/moviePlayer/YoutubePlayer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export const YouTubePlayer = ({
const height = 255;
const width = Math.round(height / aspectRatio);
return (
<div className="">
<div>
{hasWindow && (
<div>
<PreYouTubePlayer
Expand Down Expand Up @@ -69,7 +69,7 @@ export const YouTubePlayer = ({
const height = 255;
const width = Math.round(height / aspectRatio);
return (
<div className="">
<div>
{hasWindow && (
<div>
<PreYouTubePlayer
Expand Down
6 changes: 3 additions & 3 deletions t0016Next/myapp/src/components/table-tanstack/Commons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { domain } from "@/../env";
import { ReceivedKaraoke, FavoriteKaraoke } from "@/types/vtuber_content";
import { LinkTW, TableCss as TableTW } from "@/styles/tailwiind";
import { SigninContext } from "@/components/layout/Layout";
import { stringToTime } from "@/util";
import { timeStringToSecondNum } from "@/util";
import { TableCss } from "@/styles/tailwiind";
import type {
FavoriteColumn,
Expand Down Expand Up @@ -156,7 +156,7 @@ export const KaraokeBasicColumuns: ColumnDef<ReceivedKaraoke>[] = [
const handleClickPlay = (post: ReceivedKaraoke) => {
handleMovieClickYouTube(
row.original.MovieUrl,
stringToTime(row.original.SingStart)
timeStringToSecondNum(row.original.SingStart)
);
setSelectedPost(post);
};
Expand All @@ -167,7 +167,7 @@ export const KaraokeBasicColumuns: ColumnDef<ReceivedKaraoke>[] = [
"https://" +
row.original.MovieUrl +
"&t=" +
stringToTime(row.original.SingStart);
timeStringToSecondNum(row.original.SingStart);
await navigator.clipboard.writeText(url);
setIsDisplay(true);
setSelectedPost(row.original);
Expand Down
2 changes: 1 addition & 1 deletion t0016Next/myapp/src/components/table/Karaoke.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -754,7 +754,7 @@ const deleteColumns: Column<ReceivedKaraoke>[] = [
accessor: "VtuberName",
Cell: ({ row }: { row: { original: ReceivedKaraoke } }) => {
return (
<span key={row.original.VtuberId} className="relative">
<span key={row.original.KaraokeId} className="relative">
<Link
href={`/vtuber/${row.original.VtuberKana}`}
className={`flex ${LinkTW.base}`}
Expand Down
4 changes: 2 additions & 2 deletions t0016Next/myapp/src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@ const TopPage = ({ posts, isSignin }: TopPageProps) => {
<div className="pt-1">
<TitleGroup />
<TopPageNotice />
<Page posts={posts} isSignin={isSignin} />
<MainItem posts={posts} isSignin={isSignin} />
</div>
</Layout>
);
};

const Page = ({ posts }: TopPageProps) => {
const MainItem = ({ posts }: TopPageProps) => {
const url = "www.youtube.com/watch?v=E7x2TZ1_Ys4"; // 【オフコラボ】#VTuberカラオケ女子会 ~ノイタミナアニメ縛り~【朝ノ瑠璃/久遠たま/柾花音/ChumuNote】
const stringTime = "36 * 60 + 41"; // (柾花音) Departures 〜あなたにおくるアイの歌〜 / EGOIST / TVアニメ『ギルティクラウン』ED
const playKaraokeNumber = generateRandomNumber(posts?.latest_karaokes.length);
Expand Down
168 changes: 83 additions & 85 deletions t0016Next/myapp/src/types/vtuber_content.ts
Original file line number Diff line number Diff line change
@@ -1,116 +1,114 @@
import { ListenerId } from './user'
import { ListenerId } from "./user";

export type BasicDataProps = {
vtubers: ReceivedVtuber[];
vtubers_movies: ReceivedMovie[];
vtubers_movies_karaokes: ReceivedKaraoke[];
vtubers: ReceivedVtuber[];
vtubers_movies: ReceivedMovie[];
vtubers_movies_karaokes: ReceivedKaraoke[];
};
export type CrudContentType = "none" | "vtuber" | "movie" | "karaoke";

export type CrudDate = {
VtuberId: number;
VtuberName: string;
VtuberKana: string;
IntroMovieUrl: string | null;
MovieUrl: string;
MovieTitle: string;
KaraokeId: number;
SingStart: string;
SongName: string;
}
VtuberId: number;
VtuberName: string;
VtuberKana: string;
IntroMovieUrl: string | null;
MovieUrl: string;
MovieTitle: string;
KaraokeId: number;
SingStart: string;
SongName: string;
};
//以下、基礎の型3つ

export type VtuberId = number;
export type KaraokeId = number
export type SongId = number
export type KaraokeId = number;
export type SongId = number;

export type PrimitiveVtuber = {
VtuberId: VtuberId;
VtuberName: string;
VtuberKana: string;
IntroMovieUrl: string | null;
VtuberInputterId: string;
VtuberId: VtuberId;
VtuberName: string;
VtuberKana: string;
IntroMovieUrl: string | null;
VtuberInputterId: string;
};

export type PrimitiveMovie = {
MovieUrl: string;
MovieTitle: string | null;
VtuberId: number;
MovieInputterId: number | null;
MovieUrl: string;
MovieTitle: string | null;
VtuberId: number;
MovieInputterId: number | null;
};

export type PrimitiveKaraoke = {
KaraokeId: number;
MovieUrl: string | null;
SingStart: string;
SongName: string | null;
KaraokeInputterId: number | null;
KaraokeId: number;
MovieUrl: string | null;
SingStart: string;
SongName: string | null;
KaraokeInputterId: number | null;
};

export type PrimitiveOriginalSong = {
SongID: SongId
ArtistId: number
SongName: string
MovieUrl: string
ReleseData: string
SongInputterId: ListenerId;
}

SongID: SongId;
ArtistId: number;
SongName: string;
MovieUrl: string;
ReleseData: string;
SongInputterId: ListenerId;
};

// 画面表示に使う型

export type ReceivedVtuber = {
VtuberId: VtuberId;
VtuberName: string;
VtuberKana: string;
IntroMovieUrl: string | null;
VtuberInputterId: string;

Count: number;
IsFav: boolean;
}
VtuberId: VtuberId;
VtuberName: string;
VtuberKana: string;
IntroMovieUrl: string | null;
VtuberInputterId: string;

Count: number;
IsFav: boolean;
};

export type ReceivedMovie = {
VtuberId: VtuberId;
VtuberName: string;
VtuberKana: string;
IntroMovieUrl: string | null;
VtuberInputterId: ListenerId;

MovieUrl: string;
MovieTitle: string;
MovieInputterId: number;

Count: number;
IsFav: boolean;

}
VtuberId: VtuberId;
VtuberName: string;
VtuberKana: string;
IntroMovieUrl: string | null;
VtuberInputterId: ListenerId;

MovieUrl: string;
MovieTitle: string;
MovieInputterId: number;

Count: number;
IsFav: boolean;
};

export type ReceivedKaraoke = {
VtuberId: VtuberId;
VtuberName: string;
VtuberKana: string;
IntroMovieUrl: string | null;
VtuberInputterId: ListenerId;

MovieUrl: string;
MovieTitle: string;
MovieInputterId: number;

KaraokeId: number;
SingStart: string;
SongName: string;
KaraokeInputterId: number;

Count: number;
IsFav: boolean;
}
VtuberId: VtuberId;
VtuberName: string;
VtuberKana: string;
IntroMovieUrl: string | null;
VtuberInputterId: ListenerId;

MovieUrl: string;
MovieTitle: string;
MovieInputterId: number;

KaraokeId: number;
SingStart: string;
SongName: string;
KaraokeInputterId: number;

Count: number;
IsFav: boolean;
};

export type FavoriteKaraoke = {
MovieUrl: string;
KaraokeId: number;
}
MovieUrl: string;
KaraokeId: number;
};

export type FavoriteMovie = {
MovieUrl: string;
}

MovieUrl: string;
};

0 comments on commit 39dd623

Please sign in to comment.