Skip to content

Commit

Permalink
1.7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
nikomatt69 committed Nov 2, 2023
1 parent ca3185d commit f932af7
Show file tree
Hide file tree
Showing 11 changed files with 14 additions and 77 deletions.
2 changes: 1 addition & 1 deletion next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ const nextConfig = withPWA({
{ key: 'X-XSS-Protection', value: '1; mode=block' },
{ key: 'Referrer-Policy', value: 'strict-origin-when-cross-origin' },
{key:'Cross-Origin-Opener-Policy', value: 'same-origin-allow-popups'},
{key:'Content-Security-Policy', value: 'strict-dynamic'}



]
Expand Down
Binary file added public/images/placeholder.webp
Binary file not shown.
5 changes: 1 addition & 4 deletions src/components/Composer/Actions/PollSettings/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,8 @@ const PollSettings: FC = () => {
(state) => state.setShowPollEditor
);
const resetPollConfig = usePublicationStore((state) => state.resetPollConfig);
const isPollsEnabled = isFeatureEnabled(FeatureFlag.Polls);

if (!isPollsEnabled) {
return null;
}


return (
<Tooltip placement="top" content={`Poll`}>
Expand Down
2 changes: 1 addition & 1 deletion src/components/Latest.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ const Latest = () => {

const request = {
sortCriteria: PublicationSortCriteria.Latest,
limit: 20,
limit: 15,
noRandomize: false,
sources: [
APP_ID,
Expand Down
6 changes: 4 additions & 2 deletions src/components/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,16 @@ const Navbar: FC = () => {
});

return (
<header>
<header className={` ${
visible ? 'top-0' : ''
} `}>
<div
className={`sticky z-10 flex h-[50px] w-full items-center justify-between rounded-md rounded-t-sm border-2 border-b border-t-0 border-blue-700 bg-white/70 p-2 dark:bg-gray-900/70 ${
visible ? 'top-0' : ''
} `}
>
<button
className="inline-flex items-center justify-center mr-1 rounded-md text-gray-500 focus:outline-none md:hidden"
className="inline-flex items-center justify-center mr-1 rounded-md text-gray-500 focus:outline-none "
onClick={() => setShowSearch(!showSearch)}
>
{showSearch ? (
Expand Down
1 change: 0 additions & 1 deletion src/components/Providers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ const Providers = ({ children }: { children: ReactNode }) => {
<Web3Provider>
<ApolloProvider client={apolloClient}>
<LensSubscriptionsProvider />
<WebSocketProvider />
<QueryClientProvider client={queryClient}>
<LivepeerConfig client={livepeerClient}>
<ThemeProvider defaultTheme="light" attribute="class">
Expand Down
2 changes: 1 addition & 1 deletion src/lib/browserPush.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ let browserPushWorker: Worker;

if (typeof Worker !== 'undefined') {
browserPushWorker = new Worker(
new URL('src/sw/browserPushWorker', import.meta.url)
new URL('./browserPushWorker', import.meta.url)
);
}

Expand Down
6 changes: 6 additions & 0 deletions src/lib/browserPushWorker.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
const onBrowserPushWorkerMessage = (event: MessageEvent) => {
const { data } = event;
postMessage(data);
};

addEventListener('message', onBrowserPushWorkerMessage);
24 changes: 0 additions & 24 deletions src/sw/browserPush.ts

This file was deleted.

11 changes: 0 additions & 11 deletions src/sw/browserPushWorker.ts

This file was deleted.

32 changes: 0 additions & 32 deletions src/sw/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,38 +35,6 @@ const handleFetch = (event: FetchEvent): void => {
return;
};

if (typeof Worker !== 'undefined') {
browserPushWorker = new Worker(
new URL('./browserPushWorker', import.meta.url)
);
}

/**
* Browser push notification
*/
export const BrowserPush = {
notify: ({ title }: { title: string }) => {
browserPushWorker.postMessage({ title });

browserPushWorker.onmessage = function (event: MessageEvent) {
const response = event.data;
new Notification('LensShare', {
body: response.title,
icon: 'public/images/icon.png'
});
};
}
};

const onBrowserPushWorkerMessage = (event: MessageEvent) => {
const { data } = event;
postMessage(data);
return;
};

browserPushWorker.addEventListener('message', onBrowserPushWorkerMessage);
browserPushWorker.addEventListener('message', (event) => event.data);
self.addEventListener('message', (event) => event.data);
self.addEventListener('fetch', handleFetch);
self.addEventListener('install', (event) => event.waitUntil(handleInstall()));
self.addEventListener('activate', (event) => event.waitUntil(handleActivate()));
Expand Down

1 comment on commit f932af7

@vercel
Copy link

@vercel vercel bot commented on f932af7 Nov 2, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.