mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Revert local changes to yarn.lock and web components
This commit is contained in:
parent
3806e971d3
commit
67dee5b23f
5 changed files with 87 additions and 106 deletions
|
|
@ -14,7 +14,6 @@ export type SuggestionAction = {
|
|||
type SuggestionBoxProps = {
|
||||
helpMessage: string
|
||||
suggestions: SuggestionAction[]
|
||||
isError: boolean
|
||||
|
||||
size?: 'large' | 'small'
|
||||
background?: string
|
||||
|
|
@ -26,7 +25,6 @@ type SuggestionBoxProps = {
|
|||
type InternalOrExternalLinkProps = {
|
||||
link: string
|
||||
children: ReactNode
|
||||
showArrow: boolean
|
||||
}
|
||||
|
||||
const InternalOrExternalLink = (props: InternalOrExternalLinkProps) => {
|
||||
|
|
@ -42,16 +40,14 @@ const InternalOrExternalLink = (props: InternalOrExternalLinkProps) => {
|
|||
}}
|
||||
>
|
||||
{!isExternal ? (
|
||||
<Link href={props.link} legacyBehavior>
|
||||
{props.children}
|
||||
</Link>
|
||||
<Link href={props.link} legacyBehavior>{props.children}</Link>
|
||||
) : (
|
||||
<a href={props.link} target="_blank" rel="noreferrer">
|
||||
{props.children}
|
||||
</a>
|
||||
)}
|
||||
</SpanBox>
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
export const SuggestionBox = (props: SuggestionBoxProps) => {
|
||||
|
|
@ -63,13 +59,14 @@ export const SuggestionBox = (props: SuggestionBoxProps) => {
|
|||
flexDirection: props.size == 'large' ? 'column' : 'row',
|
||||
width: 'fit-content',
|
||||
borderRadius: '5px',
|
||||
fontSize: '18px',
|
||||
background: props.background ?? '$thBackground3',
|
||||
fontSize: '15px',
|
||||
fontFamily: '$inter',
|
||||
fontWeight: '500',
|
||||
color: '$grayText',
|
||||
color: '$thTextContrast',
|
||||
px: '15px',
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center',
|
||||
py: props.size == 'large' ? '15px' : '10px',
|
||||
justifyContent: 'flex-start',
|
||||
'@smDown': {
|
||||
flexDirection: 'column',
|
||||
alignItems: 'center',
|
||||
|
|
@ -77,7 +74,7 @@ export const SuggestionBox = (props: SuggestionBoxProps) => {
|
|||
},
|
||||
}}
|
||||
>
|
||||
<VStack css={{ alignItems: 'center' }}>
|
||||
<VStack>
|
||||
{props.dismissible && (
|
||||
<SpanBox
|
||||
css={{
|
||||
|
|
@ -102,13 +99,12 @@ export const SuggestionBox = (props: SuggestionBoxProps) => {
|
|||
<InternalOrExternalLink
|
||||
key={`suggestions-${idx}`}
|
||||
link={suggestion.url}
|
||||
showArrow={!props.isError}
|
||||
>
|
||||
<SpanBox
|
||||
css={{
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
// color: '$omnivoreCtaYellow',
|
||||
color: '$omnivoreCtaYellow',
|
||||
pt: '15px',
|
||||
gap: '2px',
|
||||
'&:hover': {
|
||||
|
|
@ -117,12 +113,10 @@ export const SuggestionBox = (props: SuggestionBoxProps) => {
|
|||
}}
|
||||
>
|
||||
<>{suggestion.text}</>
|
||||
{props.showArrow && (
|
||||
<ArrowRightIcon
|
||||
size={25}
|
||||
color={theme.colors.omnivoreCtaYellow.toString()}
|
||||
/>
|
||||
)}
|
||||
<ArrowRightIcon
|
||||
size={25}
|
||||
color={theme.colors.omnivoreCtaYellow.toString()}
|
||||
/>
|
||||
</SpanBox>
|
||||
</InternalOrExternalLink>
|
||||
)
|
||||
|
|
|
|||
|
|
@ -3,10 +3,8 @@ import { useMemo } from 'react'
|
|||
import { LIBRARY_LEFT_MENU_WIDTH } from './LibraryFilterMenu'
|
||||
import { LayoutType } from './HomeFeedContainer'
|
||||
import { SuggestionBox, SuggestionAction } from '../../elements/SuggestionBox'
|
||||
import { ErrorSlothIcon } from '../../elements/icons/ErrorSlothIcon'
|
||||
|
||||
type EmptyLibraryProps = {
|
||||
isError: boolean
|
||||
searchTerm: string | undefined
|
||||
onAddLinkClicked: () => void
|
||||
|
||||
|
|
@ -28,14 +26,10 @@ type MessageType =
|
|||
|
||||
type HelpMessageProps = {
|
||||
type: MessageType
|
||||
isError: boolean
|
||||
}
|
||||
|
||||
export const ErrorBox = (props: HelpMessageProps) => {
|
||||
const errorTitle = useMemo(() => {
|
||||
if (props.isError) {
|
||||
return 'An error occurred'
|
||||
}
|
||||
switch (props.type) {
|
||||
case 'inbox':
|
||||
return 'Your inbox is empty. The inbox will contain all your non-archived saved items.'
|
||||
|
|
@ -66,10 +60,12 @@ export const ErrorBox = (props: HelpMessageProps) => {
|
|||
css={{
|
||||
width: 'fit-content',
|
||||
borderRadius: '5px',
|
||||
fontSize: '25px',
|
||||
background: 'rgba(255, 59, 48, 0.3)',
|
||||
fontSize: '15px',
|
||||
fontFamily: '$inter',
|
||||
fontWeight: '700',
|
||||
fontWeight: '500',
|
||||
color: '$thTextContrast',
|
||||
py: '10px',
|
||||
px: '15px',
|
||||
'@smDown': {
|
||||
width: '100%',
|
||||
|
|
@ -77,7 +73,6 @@ export const ErrorBox = (props: HelpMessageProps) => {
|
|||
'@xlgDown': {
|
||||
justifyContent: 'flex-start',
|
||||
},
|
||||
alignItems: 'center',
|
||||
}}
|
||||
>
|
||||
{errorTitle}
|
||||
|
|
@ -92,17 +87,6 @@ type SuggestionMessage = {
|
|||
|
||||
export const Suggestion = (props: HelpMessageProps) => {
|
||||
const helpMessage = useMemo<SuggestionMessage>(() => {
|
||||
if (props.isError) {
|
||||
return {
|
||||
message: 'Something went wrong searching your library',
|
||||
actions: [
|
||||
{
|
||||
text: 'Join our Discord to get help',
|
||||
url: 'https://discord.gg/h2z5rppzz9',
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
switch (props.type) {
|
||||
case 'feed':
|
||||
return {
|
||||
|
|
@ -167,7 +151,6 @@ export const Suggestion = (props: HelpMessageProps) => {
|
|||
<>
|
||||
{helpMessage ? (
|
||||
<SuggestionBox
|
||||
isError={props.isError}
|
||||
helpMessage={helpMessage.message}
|
||||
suggestions={helpMessage.actions}
|
||||
/>
|
||||
|
|
@ -211,16 +194,13 @@ export const EmptyLibrary = (props: EmptyLibraryProps) => {
|
|||
<Box
|
||||
css={{
|
||||
display: 'inline-flex',
|
||||
color: '$thTextSubtle2',
|
||||
color: '$grayTextContrast',
|
||||
gap: '10px',
|
||||
pl: '0px',
|
||||
pt: '30px',
|
||||
|
||||
width: '100%',
|
||||
flexDirection: 'column',
|
||||
|
||||
alignItems: 'center',
|
||||
|
||||
'@media (max-width: 768px)': {
|
||||
p: '15px',
|
||||
},
|
||||
|
|
@ -243,9 +223,8 @@ export const EmptyLibrary = (props: EmptyLibraryProps) => {
|
|||
},
|
||||
}}
|
||||
>
|
||||
{props.isError && <ErrorSlothIcon />}
|
||||
<ErrorBox type={type} isError={props.isError} />
|
||||
<Suggestion type={type} isError={props.isError} />
|
||||
<ErrorBox type={type} />
|
||||
<Suggestion type={type} />
|
||||
</Box>
|
||||
)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -111,7 +111,6 @@ export function HomeFeedContainer(): JSX.Element {
|
|||
size,
|
||||
setSize,
|
||||
isValidating,
|
||||
itemsDataError,
|
||||
performActionOnItem,
|
||||
mutate,
|
||||
} = useGetLibraryItemsQuery(queryInputs)
|
||||
|
|
@ -129,12 +128,6 @@ export function HomeFeedContainer(): JSX.Element {
|
|||
}
|
||||
}, [mutate])
|
||||
|
||||
useMemo(() => {
|
||||
if (itemsDataError) {
|
||||
console.log('search error: ', itemsDataError)
|
||||
}
|
||||
}, [itemsDataError])
|
||||
|
||||
useEffect(() => {
|
||||
if (queryValue.startsWith('#')) {
|
||||
debouncedFetchSearchResults(
|
||||
|
|
@ -861,7 +854,6 @@ export function HomeFeedContainer(): JSX.Element {
|
|||
hasMore={hasMore}
|
||||
hasData={!!itemsPages}
|
||||
totalItems={itemsPages?.[0].search.pageInfo.totalCount || 0}
|
||||
isError={!!itemsDataError}
|
||||
isValidating={isValidating}
|
||||
labelsTarget={labelsTarget}
|
||||
setLabelsTarget={setLabelsTarget}
|
||||
|
|
@ -896,7 +888,6 @@ type HomeFeedContentProps = {
|
|||
hasMore: boolean
|
||||
hasData: boolean
|
||||
totalItems: number
|
||||
isError: boolean
|
||||
isValidating: boolean
|
||||
loadMore: () => void
|
||||
labelsTarget: LibraryItem | undefined
|
||||
|
|
@ -1073,7 +1064,6 @@ function LibraryItemsLayout(props: LibraryItemsLayoutProps): JSX.Element {
|
|||
>
|
||||
{!props.isValidating && props.items.length == 0 ? (
|
||||
<EmptyLibrary
|
||||
isError={props.isError}
|
||||
layoutType={props.layout}
|
||||
searchTerm={props.searchTerm}
|
||||
onAddLinkClicked={() => {
|
||||
|
|
|
|||
|
|
@ -246,16 +246,6 @@ export function useGetLibraryItemsQuery({
|
|||
},
|
||||
{ revalidateFirstPage: false }
|
||||
)
|
||||
console.log(
|
||||
'data: ',
|
||||
data,
|
||||
'size',
|
||||
size,
|
||||
'isValidating',
|
||||
isValidating,
|
||||
'error',
|
||||
error
|
||||
)
|
||||
|
||||
let responseError = error
|
||||
let responsePages = data as LibraryItemsData[] | undefined
|
||||
|
|
|
|||
106
yarn.lock
106
yarn.lock
|
|
@ -5858,15 +5858,6 @@
|
|||
"@sentry/types" "7.77.0"
|
||||
"@sentry/utils" "7.77.0"
|
||||
|
||||
"@sentry-internal/tracing@7.91.0":
|
||||
version "7.91.0"
|
||||
resolved "https://registry.yarnpkg.com/@sentry-internal/tracing/-/tracing-7.91.0.tgz#fbb6e1e3383e1eeee08633384e004da73ac1c37d"
|
||||
integrity sha512-JH5y6gs6BS0its7WF2DhySu7nkhPDfZcdpAXldxzIlJpqFkuwQKLU5nkYJpiIyZz1NHYYtW5aum2bV2oCOdDRA==
|
||||
dependencies:
|
||||
"@sentry/core" "7.91.0"
|
||||
"@sentry/types" "7.91.0"
|
||||
"@sentry/utils" "7.91.0"
|
||||
|
||||
"@sentry/browser@7.50.0":
|
||||
version "7.50.0"
|
||||
resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-7.50.0.tgz#16c995c336322c8aec65570f90f50288678004ec"
|
||||
|
|
@ -5891,6 +5882,17 @@
|
|||
proxy-from-env "^1.1.0"
|
||||
which "^2.0.2"
|
||||
|
||||
"@sentry/core@5.30.0":
|
||||
version "5.30.0"
|
||||
resolved "https://registry.yarnpkg.com/@sentry/core/-/core-5.30.0.tgz#6b203664f69e75106ee8b5a2fe1d717379b331f3"
|
||||
integrity sha512-TmfrII8w1PQZSZgPpUESqjB+jC6MvZJZdLtE/0hZ+SrnKhW3x5WlYLvTXZpcWePYBku7rl2wn1RZu6uT0qCTeg==
|
||||
dependencies:
|
||||
"@sentry/hub" "5.30.0"
|
||||
"@sentry/minimal" "5.30.0"
|
||||
"@sentry/types" "5.30.0"
|
||||
"@sentry/utils" "5.30.0"
|
||||
tslib "^1.9.3"
|
||||
|
||||
"@sentry/core@7.50.0":
|
||||
version "7.50.0"
|
||||
resolved "https://registry.yarnpkg.com/@sentry/core/-/core-7.50.0.tgz#88bc9cbfc0cb429a28489ece6f0be7a7006436c4"
|
||||
|
|
@ -5908,13 +5910,14 @@
|
|||
"@sentry/types" "7.77.0"
|
||||
"@sentry/utils" "7.77.0"
|
||||
|
||||
"@sentry/core@7.91.0":
|
||||
version "7.91.0"
|
||||
resolved "https://registry.yarnpkg.com/@sentry/core/-/core-7.91.0.tgz#229334d7f03dd5d90a17495e61ce4215ab730b2a"
|
||||
integrity sha512-tu+gYq4JrTdrR+YSh5IVHF0fJi/Pi9y0HZ5H9HnYy+UMcXIotxf6hIEaC6ZKGeLWkGXffz2gKpQLe/g6vy/lPA==
|
||||
"@sentry/hub@5.30.0":
|
||||
version "5.30.0"
|
||||
resolved "https://registry.yarnpkg.com/@sentry/hub/-/hub-5.30.0.tgz#2453be9b9cb903404366e198bd30c7ca74cdc100"
|
||||
integrity sha512-2tYrGnzb1gKz2EkMDQcfLrDTvmGcQPuWxLnJKXJvYTQDGLlEvi2tWz1VIHjunmOvJrB5aIQLhm+dcMRwFZDCqQ==
|
||||
dependencies:
|
||||
"@sentry/types" "7.91.0"
|
||||
"@sentry/utils" "7.91.0"
|
||||
"@sentry/types" "5.30.0"
|
||||
"@sentry/utils" "5.30.0"
|
||||
tslib "^1.9.3"
|
||||
|
||||
"@sentry/integrations@7.50.0":
|
||||
version "7.50.0"
|
||||
|
|
@ -5936,6 +5939,15 @@
|
|||
"@sentry/utils" "7.77.0"
|
||||
localforage "^1.8.1"
|
||||
|
||||
"@sentry/minimal@5.30.0":
|
||||
version "5.30.0"
|
||||
resolved "https://registry.yarnpkg.com/@sentry/minimal/-/minimal-5.30.0.tgz#ce3d3a6a273428e0084adcb800bc12e72d34637b"
|
||||
integrity sha512-BwWb/owZKtkDX+Sc4zCSTNcvZUq7YcH3uAVlmh/gtR9rmUvbzAA3ewLuB3myi4wWRAMEtny6+J/FN/x+2wn9Xw==
|
||||
dependencies:
|
||||
"@sentry/hub" "5.30.0"
|
||||
"@sentry/types" "5.30.0"
|
||||
tslib "^1.9.3"
|
||||
|
||||
"@sentry/nextjs@^7.42.0":
|
||||
version "7.50.0"
|
||||
resolved "https://registry.yarnpkg.com/@sentry/nextjs/-/nextjs-7.50.0.tgz#b9e7727c8f974644bb84a01f40a0adedb44ec416"
|
||||
|
|
@ -5979,16 +5991,20 @@
|
|||
"@sentry/utils" "7.77.0"
|
||||
https-proxy-agent "^5.0.0"
|
||||
|
||||
"@sentry/node@^7.10.0":
|
||||
version "7.91.0"
|
||||
resolved "https://registry.yarnpkg.com/@sentry/node/-/node-7.91.0.tgz#26bf13c3daf988f9725afd1a3cc38ba2ff90d62a"
|
||||
integrity sha512-hTIfSQxD7L+AKIqyjoq8CWBRkEQrrMZmA3GSZgPI5JFWBHgO0HBo5TH/8TU81oEJh6kqqHAl2ObMhmcnaFqlzg==
|
||||
"@sentry/node@^5.26.0":
|
||||
version "5.30.0"
|
||||
resolved "https://registry.yarnpkg.com/@sentry/node/-/node-5.30.0.tgz#4ca479e799b1021285d7fe12ac0858951c11cd48"
|
||||
integrity sha512-Br5oyVBF0fZo6ZS9bxbJZG4ApAjRqAnqFFurMVJJdunNb80brh7a5Qva2kjhm+U6r9NJAB5OmDyPkA1Qnt+QVg==
|
||||
dependencies:
|
||||
"@sentry-internal/tracing" "7.91.0"
|
||||
"@sentry/core" "7.91.0"
|
||||
"@sentry/types" "7.91.0"
|
||||
"@sentry/utils" "7.91.0"
|
||||
"@sentry/core" "5.30.0"
|
||||
"@sentry/hub" "5.30.0"
|
||||
"@sentry/tracing" "5.30.0"
|
||||
"@sentry/types" "5.30.0"
|
||||
"@sentry/utils" "5.30.0"
|
||||
cookie "^0.4.1"
|
||||
https-proxy-agent "^5.0.0"
|
||||
lru_map "^0.3.3"
|
||||
tslib "^1.9.3"
|
||||
|
||||
"@sentry/react@7.50.0":
|
||||
version "7.50.0"
|
||||
|
|
@ -6022,12 +6038,28 @@
|
|||
"@types/aws-lambda" "^8.10.62"
|
||||
"@types/express" "^4.17.14"
|
||||
|
||||
"@sentry/tracing@^7.10.0":
|
||||
version "7.91.0"
|
||||
resolved "https://registry.yarnpkg.com/@sentry/tracing/-/tracing-7.91.0.tgz#2019542a9ed991c04a1f5e685a245b0fb8d69be1"
|
||||
integrity sha512-IlSAMvqfCL/2TwwN4Tmk6bGMgilGruv5oIJ1GMenVZk53bHwjpjzMbd0ms8+S5zJwAgTQXoCbRhaFFrNmptteQ==
|
||||
"@sentry/tracing@5.30.0":
|
||||
version "5.30.0"
|
||||
resolved "https://registry.yarnpkg.com/@sentry/tracing/-/tracing-5.30.0.tgz#501d21f00c3f3be7f7635d8710da70d9419d4e1f"
|
||||
integrity sha512-dUFowCr0AIMwiLD7Fs314Mdzcug+gBVo/+NCMyDw8tFxJkwWAKl7Qa2OZxLQ0ZHjakcj1hNKfCQJ9rhyfOl4Aw==
|
||||
dependencies:
|
||||
"@sentry-internal/tracing" "7.91.0"
|
||||
"@sentry/hub" "5.30.0"
|
||||
"@sentry/minimal" "5.30.0"
|
||||
"@sentry/types" "5.30.0"
|
||||
"@sentry/utils" "5.30.0"
|
||||
tslib "^1.9.3"
|
||||
|
||||
"@sentry/tracing@^7.9.0":
|
||||
version "7.77.0"
|
||||
resolved "https://registry.yarnpkg.com/@sentry/tracing/-/tracing-7.77.0.tgz#39d7c30834f503fe9eb20ce1c8c8bd28f7d7c9ce"
|
||||
integrity sha512-zr6eSCW3NJ124uj4Fy/6hh77cziy43dpYE1WpgvO/yhl1+kdrY2XVJ0bXGqwHU0KBm/eSgHD7yecUxmZUXiabA==
|
||||
dependencies:
|
||||
"@sentry-internal/tracing" "7.77.0"
|
||||
|
||||
"@sentry/types@5.30.0":
|
||||
version "5.30.0"
|
||||
resolved "https://registry.yarnpkg.com/@sentry/types/-/types-5.30.0.tgz#19709bbe12a1a0115bc790b8942917da5636f402"
|
||||
integrity sha512-R8xOqlSTZ+htqrfteCWU5Nk0CDN5ApUTvrlvBuiH1DyP6czDZ4ktbZB0hAgBlVcK0U+qpD3ag3Tqqpa5Q67rPw==
|
||||
|
||||
"@sentry/types@7.50.0":
|
||||
version "7.50.0"
|
||||
|
|
@ -6039,10 +6071,13 @@
|
|||
resolved "https://registry.yarnpkg.com/@sentry/types/-/types-7.77.0.tgz#c5d00fe547b89ccde59cdea59143bf145cee3144"
|
||||
integrity sha512-nfb00XRJVi0QpDHg+JkqrmEBHsqBnxJu191Ded+Cs1OJ5oPXEW6F59LVcBScGvMqe+WEk1a73eH8XezwfgrTsA==
|
||||
|
||||
"@sentry/types@7.91.0":
|
||||
version "7.91.0"
|
||||
resolved "https://registry.yarnpkg.com/@sentry/types/-/types-7.91.0.tgz#5b68954e08986fecb0d4bef168df58eef62c32c7"
|
||||
integrity sha512-bcQnb7J3P3equbCUc+sPuHog2Y47yGD2sCkzmnZBjvBT0Z1B4f36fI/5WjyZhTjLSiOdg3F2otwvikbMjmBDew==
|
||||
"@sentry/utils@5.30.0":
|
||||
version "5.30.0"
|
||||
resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-5.30.0.tgz#9a5bd7ccff85ccfe7856d493bffa64cabc41e980"
|
||||
integrity sha512-zaYmoH0NWWtvnJjC9/CBseXMtKHm/tm40sz3YfJRxeQjyzRqNQPgivpd9R/oDJCYj999mzdW382p/qi2ypjLww==
|
||||
dependencies:
|
||||
"@sentry/types" "5.30.0"
|
||||
tslib "^1.9.3"
|
||||
|
||||
"@sentry/utils@7.50.0":
|
||||
version "7.50.0"
|
||||
|
|
@ -6059,13 +6094,6 @@
|
|||
dependencies:
|
||||
"@sentry/types" "7.77.0"
|
||||
|
||||
"@sentry/utils@7.91.0":
|
||||
version "7.91.0"
|
||||
resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-7.91.0.tgz#3b1a94c053c885877908cd3e1365e3d23e21a73f"
|
||||
integrity sha512-fvxjrEbk6T6Otu++Ax9ntlQ0sGRiwSC179w68aC3u26Wr30FAIRKqHTCCdc2jyWk7Gd9uWRT/cq+g8NG/8BfSg==
|
||||
dependencies:
|
||||
"@sentry/types" "7.91.0"
|
||||
|
||||
"@sentry/webpack-plugin@1.20.0":
|
||||
version "1.20.0"
|
||||
resolved "https://registry.yarnpkg.com/@sentry/webpack-plugin/-/webpack-plugin-1.20.0.tgz#e7add76122708fb6b4ee7951294b521019720e58"
|
||||
|
|
|
|||
Loading…
Reference in a new issue