-
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.
- Loading branch information
Showing
16 changed files
with
185 additions
and
153 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
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,16 +1,17 @@ | ||
<script setup lang="ts"></script> | ||
|
||
<template> | ||
<article | ||
class="flex bg-secondaryDarker gap-4 items-center justify-between p-4 md:p-5 rounded-lg md:min-w-[648px] min-h-52 animate-pulse"> | ||
<div class="flex flex-col"> | ||
<div | ||
class="flex flex-col xs:flex-row bg-secondaryDarker gap-4 items-center justify-between p-4 md:p-5 rounded-lg w-full xl:max-w-[585px] 2xl:max-w-[648px] min-h-52 animate-pulse"> | ||
<div class="flex flex-col w-full"> | ||
<span class="bg-gray-300 h-4 w-24 mb-1 rounded"></span> | ||
<div class="flex flex-col"> | ||
<span class="bg-gray-300 h-6 w-48 mb-2 rounded"></span> | ||
<span class="bg-gray-300 h-4 w-64 mb-2 rounded"></span> | ||
</div> | ||
<span class="bg-gray-300 h-4 w-32 mt-2 rounded"></span> | ||
</div> | ||
<div class="bg-gray-300 w-[200px] h-[100px] rounded"></div> | ||
</article> | ||
<div class="bg-gray-300 w-[200px] h-[100px] xs:w-[150px] xs:h-[75px] sm:w-[200px] sm:h-[100px] rounded"> | ||
</div> | ||
</div> | ||
</template> |
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
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,26 +1,26 @@ | ||
import { ref } from "vue"; | ||
import { defineStore } from "pinia"; | ||
import type { New } from "@/types/Finnhub/New"; | ||
import type { Category } from "@/types/Finnhub/Category"; | ||
import {ref} from "vue"; | ||
import {defineStore} from "pinia"; | ||
import type {New} from "@/types/Finnhub/New"; | ||
import type {Category} from "@/types/Finnhub/Category"; | ||
|
||
type CategoriesNews = { | ||
[ key in Category ]: New[]; | ||
[key in Category]: New[]; | ||
}; | ||
|
||
export const useNewsStore = defineStore("news", () => { | ||
const news = ref<CategoriesNews>({ | ||
crypto: [], | ||
forex: [], | ||
general: [], | ||
merger: [], | ||
}); | ||
const news = ref<CategoriesNews>({ | ||
crypto: [], | ||
forex: [], | ||
general: [], | ||
merger: [], | ||
}); | ||
|
||
function addNews(data: New[], category: Category): void { | ||
news.value[ category ].push(...data); | ||
} | ||
function addNews(data: New[], category: Category): void { | ||
news.value[category].push(...data); | ||
} | ||
|
||
return { | ||
news, | ||
addNews, | ||
}; | ||
return { | ||
news, | ||
addNews, | ||
}; | ||
}); |
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.