mirror of
https://github.com/yzernik/squeaknode.git
synced 2026-08-13 12:33:25 +02:00
Add twitter forwarder frontend (#2038)
* Got basic add twitter forwarder account working * Got delete twitter account working * Link to profile page from twitter account card * Simplify text for delete twitter account button * Update frontend build
This commit is contained in:
parent
b578ada984
commit
c3930b8fe0
33 changed files with 872 additions and 98 deletions
|
|
@ -12,6 +12,7 @@ import Payments from './components/Payments'
|
|||
import Peers from './components/Peers'
|
||||
import Feed from './components/Feed'
|
||||
import Search from './components/Search'
|
||||
import Twitter from './components/Twitter'
|
||||
import Notifications from './components/Notifications'
|
||||
import Alerts from './components/Alerts'
|
||||
|
||||
|
|
@ -50,6 +51,9 @@ const DefaultContainer = withRouter(({ history }) => {
|
|||
<Route path="/app/peers" exact>
|
||||
<Peers/>
|
||||
</Route>
|
||||
<Route path="/app/twitter" exact>
|
||||
<Twitter/>
|
||||
</Route>
|
||||
<Route path="/app/notifications" exact>
|
||||
<Notifications/>
|
||||
</Route>
|
||||
|
|
|
|||
|
|
@ -744,3 +744,40 @@ export const downloadSqueak = (squeakHash) => {
|
|||
deser: deser,
|
||||
});
|
||||
}
|
||||
|
||||
export const getTwitterAccounts = () => {
|
||||
console.log('Calling getTwitterAccounts');
|
||||
const request = new GetTwitterAccountsRequest();
|
||||
const deser = GetTwitterAccountsReply.deserializeBinary;
|
||||
return baseRequest({
|
||||
url: '/gettwitteraccounts',
|
||||
req: request,
|
||||
deser: deser,
|
||||
});
|
||||
}
|
||||
|
||||
export const createTwitterAccount = (twitterHandle, profileId, bearerToken) => {
|
||||
console.log('Calling createTwitterAccount');
|
||||
const request = new AddTwitterAccountRequest();
|
||||
request.setHandle(twitterHandle);
|
||||
request.setProfileId(profileId);
|
||||
request.setBearerToken(bearerToken);
|
||||
const deser = AddTwitterAccountReply.deserializeBinary;
|
||||
return baseRequest({
|
||||
url: '/addtwitteraccount',
|
||||
req: request,
|
||||
deser: deser,
|
||||
});
|
||||
}
|
||||
|
||||
export const deleteTwitterAccount = (twitterAccountId) => {
|
||||
console.log('Calling deleteTwitterAccount');
|
||||
const request = new DeleteTwitterAccountRequest();
|
||||
request.setTwitterAccountId(twitterAccountId);
|
||||
const deser = DeleteTwitterAccountReply.deserializeBinary;
|
||||
return baseRequest({
|
||||
url: '/deletetwitteraccount',
|
||||
req: request,
|
||||
deser: deser,
|
||||
});
|
||||
}
|
||||
|
|
|
|||
175
frontend/src/components/Twitter/index.js
Normal file
175
frontend/src/components/Twitter/index.js
Normal file
|
|
@ -0,0 +1,175 @@
|
|||
import React, { useEffect, useState, useContext } from 'react'
|
||||
import './style.scss'
|
||||
import { withRouter, Link } from 'react-router-dom'
|
||||
import { ICON_SEARCH, ICON_ARROWBACK, ICON_CLOSE } from '../../Icons'
|
||||
import { getProfileImageSrcString } from '../../squeakimages/images';
|
||||
import Loader from '../Loader'
|
||||
import SqueakCard from '../SqueakCard'
|
||||
import Select from 'react-select'
|
||||
|
||||
|
||||
import { unwrapResult } from '@reduxjs/toolkit'
|
||||
import { useDispatch } from 'react-redux'
|
||||
import { useSelector } from 'react-redux'
|
||||
|
||||
import TwitterAccounts from '../../features/twitterAccounts/TwitterAccounts'
|
||||
import {
|
||||
setCreateSigningProfile,
|
||||
} from '../../features/profiles/profilesSlice'
|
||||
|
||||
import {
|
||||
setCreateTwitterAccount,
|
||||
} from '../../features/twitterAccounts/twitterAccountsSlice'
|
||||
|
||||
import {
|
||||
selectSigningProfiles,
|
||||
fetchSigningProfiles,
|
||||
} from '../../features/profiles/profilesSlice'
|
||||
|
||||
|
||||
const Twitter = (props) => {
|
||||
const [tab, setTab] = useState('Signing Profiles')
|
||||
const [twitterAccountModalOpen, setTwitterAccountModalOpen] = useState(false)
|
||||
const [styleBody, setStyleBody] = useState(false)
|
||||
const [twitterHandle, setTwitterHandle] = useState('')
|
||||
const [newProfilePubkey, setNewProfilePubkey] = useState('')
|
||||
const [bearerToken, setBearerToken] = useState('')
|
||||
const [signingProfile, setSigningProfile] = useState(null)
|
||||
|
||||
const signingProfiles = useSelector(selectSigningProfiles);
|
||||
|
||||
const dispatch = useDispatch()
|
||||
|
||||
const searchOnChange = (param) => {
|
||||
if(tab !== 'Search'){setTab('Search')}
|
||||
if(param.length>0){
|
||||
// TODO: search for a profile by name.
|
||||
}
|
||||
}
|
||||
|
||||
const optionsFromProfiles = (profiles) => {
|
||||
return profiles.map((p) => {
|
||||
return { value: p, label: p.getProfileName() }
|
||||
// return { value: 'chocolate', label: 'Chocolate' }
|
||||
});
|
||||
}
|
||||
|
||||
const toggleCreateTwitterAccountModal = (param, type) => {
|
||||
setStyleBody(!styleBody)
|
||||
setTimeout(()=>{ setTwitterAccountModalOpen(!twitterAccountModalOpen) },20)
|
||||
}
|
||||
|
||||
const createTwitterAccount = () => {
|
||||
console.log('Create twitter account with handle:', twitterHandle);
|
||||
if (!signingProfile) {
|
||||
alert('Signing profile must be set.');
|
||||
return;
|
||||
}
|
||||
dispatch(setCreateTwitterAccount({
|
||||
twitterHandle: twitterHandle,
|
||||
profileId: signingProfile.getProfileId(),
|
||||
bearerToken: bearerToken,
|
||||
}))
|
||||
.then(unwrapResult)
|
||||
.then((pubkey) => {
|
||||
console.log('Created twitter account with handle', twitterHandle);
|
||||
})
|
||||
.catch((err) => {
|
||||
alert(err.message);
|
||||
});
|
||||
toggleCreateTwitterAccountModal();
|
||||
}
|
||||
|
||||
const handleModalClick = (e) => {
|
||||
e.stopPropagation()
|
||||
}
|
||||
|
||||
const handleChangeSigningProfile = (e) => {
|
||||
setSigningProfile(e.value);
|
||||
}
|
||||
|
||||
|
||||
return(
|
||||
<div>
|
||||
|
||||
<div className="explore-wrapper">
|
||||
<div className="explore-header">
|
||||
<div className="explore-search-wrapper">
|
||||
<div className="explore-search-icon">
|
||||
<ICON_SEARCH/>
|
||||
</div>
|
||||
<div className="explore-search-input">
|
||||
<input onChange={(e)=>searchOnChange(e.target.value)} placeholder="Search for people" type="text" name="search"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className="profile-details-wrapper">
|
||||
<div className="profiles-options">
|
||||
<div onClick={(e)=>toggleCreateTwitterAccountModal('edit')}
|
||||
className='profiles-create-button'>
|
||||
<span>Add Twitter Account</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div className="explore-nav-menu">
|
||||
<div onClick={()=>setTab('Signing Profiles')} className={tab === 'Signing Profiles' ? `explore-nav-item activeTab` : `explore-nav-item`}>
|
||||
Twitter Accounts
|
||||
</div>
|
||||
</div>
|
||||
<TwitterAccounts />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
{/* Modal for create signing profile */}
|
||||
<div onClick={()=>toggleCreateTwitterAccountModal()} style={{display: twitterAccountModalOpen ? 'block' : 'none'}} className="modal-edit">
|
||||
<div onClick={(e)=>handleModalClick(e)} className="modal-content">
|
||||
<div className="modal-header">
|
||||
<div className="modal-closeIcon">
|
||||
<div onClick={()=>toggleCreateTwitterAccountModal()} className="modal-closeIcon-wrap">
|
||||
<ICON_CLOSE />
|
||||
</div>
|
||||
</div>
|
||||
<p className="modal-title">Add Twitter Account</p>
|
||||
|
||||
<div className="save-modal-wrapper">
|
||||
<div onClick={createTwitterAccount} className="save-modal-btn">
|
||||
Submit
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="modal-body">
|
||||
<form className="edit-form">
|
||||
<div className="edit-input-wrap">
|
||||
<div className="edit-input-content">
|
||||
<label>Twitter Handle</label>
|
||||
<input onChange={(e)=>setTwitterHandle(e.target.value)} type="text" name="name" className="edit-input"/>
|
||||
</div>
|
||||
</div>
|
||||
<div className="edit-input-wrap">
|
||||
<div className="edit-input-content">
|
||||
<label>Twitter Bearer Token</label>
|
||||
<input onChange={(e)=>setBearerToken(e.target.value)} type="text" name="name" className="edit-input"/>
|
||||
</div>
|
||||
</div>
|
||||
<div className="edit-input-wrap">
|
||||
<div className="edit-input-content">
|
||||
<label>Signing Profile</label>
|
||||
<div className="inner-input-box">
|
||||
<Select options={optionsFromProfiles(signingProfiles)} onChange={handleChangeSigningProfile} />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default withRouter(Twitter)
|
||||
298
frontend/src/components/Twitter/style.scss
Normal file
298
frontend/src/components/Twitter/style.scss
Normal file
|
|
@ -0,0 +1,298 @@
|
|||
.explore-wrapper{
|
||||
max-width: 600px;
|
||||
border-right: 1px solid rgb(230, 236, 240);
|
||||
width: 100%;
|
||||
// height: 100vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-height: 2000px;
|
||||
}
|
||||
|
||||
|
||||
.explore-header{
|
||||
position: sticky;
|
||||
border-left: 1px solid rgb(230, 236, 240);
|
||||
background-color: #fff;
|
||||
z-index: 8;
|
||||
top: 0px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 53px;
|
||||
min-height: 53px;
|
||||
padding-left: 15px;
|
||||
padding-right: 15px;
|
||||
max-width: 600px;
|
||||
margin: 0 auto;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.header-border{
|
||||
border-bottom: 1px solid rgb(230, 236, 240);
|
||||
}
|
||||
|
||||
.explore-search-wrapper{
|
||||
background-color: rgb(230, 236, 240);
|
||||
border: 1px solid transparent;
|
||||
border-radius: 9999px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
min-height: 38px;
|
||||
width: 100%;
|
||||
|
||||
}
|
||||
|
||||
.explore-search-icon{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.explore-search-icon svg{
|
||||
width: 40px;
|
||||
height: 18.75px;
|
||||
fill: rgb(101, 119, 134);
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
.explore-search-input{
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.explore-search-input input{
|
||||
background-color: inherit;
|
||||
border: inherit;
|
||||
padding: 6px 10px;
|
||||
width: 100%;
|
||||
font-size: 15px;
|
||||
color: rgb(101, 119, 134);
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.explore-nav-menu{
|
||||
margin-top: 10px;
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
align-items: center;
|
||||
border-bottom: 1px solid rgb(230, 236, 240);
|
||||
}
|
||||
|
||||
.explore-nav-item{
|
||||
padding: 15px;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
font-weight: bold;
|
||||
color: rgb(101, 119, 134);
|
||||
transition: 0.2s;
|
||||
will-change: background-color;
|
||||
box-sizing:border-box;
|
||||
border-bottom: 2px solid transparent;
|
||||
&:hover{
|
||||
background-color: rgba(29, 161, 242, 0.1);
|
||||
color: rgb(29, 161, 242);
|
||||
}
|
||||
}
|
||||
|
||||
.activeTab{
|
||||
border-bottom: 2px solid rgb(29, 161, 242);
|
||||
color: rgb(29, 161, 242);
|
||||
}
|
||||
|
||||
.search-result-wapper{
|
||||
border-bottom: 1px solid rgb(230, 236, 240);
|
||||
padding: 10px 15px;
|
||||
transition: 0.2s;
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
&:hover{
|
||||
background-color: rgb(245,248,250);
|
||||
}
|
||||
}
|
||||
|
||||
.search-userPic-wrapper{
|
||||
flex-basis: 49px;
|
||||
margin-right: 10px;
|
||||
img{
|
||||
object-fit: cover;
|
||||
}
|
||||
}
|
||||
|
||||
.search-user-details{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.search-user-info{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.search-user-name{
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.search-user-username{
|
||||
color: rgb(101, 119, 134);
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.search-user-bio{
|
||||
margin-top: 7px;
|
||||
}
|
||||
|
||||
.search-user-warp{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.follow-btn-wrap{
|
||||
min-height: 30px;
|
||||
min-width: 70px;
|
||||
transition: 0.2s ease-in-out;
|
||||
cursor: pointer;
|
||||
border: 1px solid #1da1f2;
|
||||
border-radius: 9999px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
padding-left: 1em;
|
||||
padding-right: 1em;
|
||||
&:hover{
|
||||
background-color: rgba(29, 161, 242, 0.1);
|
||||
}
|
||||
}
|
||||
|
||||
.follow-btn-wrap span{
|
||||
text-align: center;
|
||||
font-weight: 800;
|
||||
color: #1da1f2;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.trending-card-wrapper{
|
||||
border-bottom: 1px solid rgb(245,248,250);
|
||||
padding: 10px 15px;
|
||||
transition: 0.2s;
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
&:hover{
|
||||
background-color: rgb(245, 248, 250);
|
||||
}
|
||||
}
|
||||
|
||||
.trending-card-header{
|
||||
color: rgb(101, 119, 134);
|
||||
font-size: 14px;
|
||||
span{
|
||||
padding: 0 3px;
|
||||
}
|
||||
}
|
||||
|
||||
.trending-card-content{
|
||||
font-weight: bold;
|
||||
font-size: 19px;
|
||||
padding-top: 2px;
|
||||
padding-bottom: 2px;
|
||||
}
|
||||
|
||||
.trending-card-count{
|
||||
font-size: 15px;
|
||||
color: rgb(101, 119, 134);
|
||||
}
|
||||
|
||||
.try-searching{
|
||||
font-weight: bold;
|
||||
font-size: 17px;
|
||||
text-align: center;
|
||||
margin-top: 40px;
|
||||
color: #657786;
|
||||
div{
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.unfollow-switch{
|
||||
background-color: rgb(29, 161, 242);
|
||||
span{color: #fff !important;}
|
||||
}
|
||||
|
||||
.unfollow-switch:hover{
|
||||
background-color: rgb(202,32,85) !important;
|
||||
border: 1px solid transparent;
|
||||
span{
|
||||
color: #fff;
|
||||
span{display: none;}
|
||||
&:before{
|
||||
content: 'Unfollow';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.explore-header-back{
|
||||
min-width: 55px;
|
||||
min-height: 30px;
|
||||
justify-content: center;
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
.explore-back-wrapper{
|
||||
margin-left: -5px;
|
||||
width: 39px;
|
||||
height: 39px;
|
||||
transition: 0.2s ease-in-out;
|
||||
will-change: background-color;
|
||||
border: 1px solid rgba(0, 0, 0, 0);
|
||||
border-radius: 9999px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
cursor: pointer;
|
||||
}
|
||||
.explore-back-wrapper svg{
|
||||
height: 1.5em;
|
||||
fill: rgb(29,161,242);
|
||||
}
|
||||
.explore-back-wrapper:hover{
|
||||
background-color: rgba(29,161,242,0.1);
|
||||
}
|
||||
|
||||
.profiles-details-wrapper{
|
||||
padding: 10px 15px 15px 15px;
|
||||
}
|
||||
|
||||
.profiles-options{
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.profiles-create-button{
|
||||
min-height: 39px;
|
||||
min-width: 98.8px;
|
||||
transition: 0.2s ease-in-out;
|
||||
cursor: pointer;
|
||||
border: 1px solid rgb(29, 161, 242);
|
||||
border-radius: 9999px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin-left: 7px;
|
||||
padding-left: 1em;
|
||||
padding-right: 1em;
|
||||
span{
|
||||
text-align: center;
|
||||
font-weight: 800;
|
||||
color: rgb(29, 161, 242);
|
||||
width: 100%
|
||||
}
|
||||
&:hover{
|
||||
background-color: rgba(29, 161, 242,0.1);
|
||||
}
|
||||
}
|
||||
98
frontend/src/features/twitterAccounts/TwitterAccountCard.js
Normal file
98
frontend/src/features/twitterAccounts/TwitterAccountCard.js
Normal file
|
|
@ -0,0 +1,98 @@
|
|||
import React, { useEffect, useState } from 'react'
|
||||
import { useSelector } from 'react-redux'
|
||||
import { useDispatch } from 'react-redux'
|
||||
import { withRouter, Link } from 'react-router-dom'
|
||||
import moment from 'moment'
|
||||
import { ICON_SETTINGS } from '../../Icons'
|
||||
import { getProfileImageSrcString } from '../../squeakimages/images';
|
||||
|
||||
|
||||
import SqueakCard from '../../components/SqueakCard'
|
||||
import Loader from '../../components/Loader'
|
||||
|
||||
import {
|
||||
setDeleteTwitterAccount,
|
||||
} from './twitterAccountsSlice'
|
||||
|
||||
|
||||
const TwitterAccountCard = (props) => {
|
||||
const [moreMenu, setMoreMenu] = useState(false)
|
||||
const [styleBody, setStyleBody] = useState(false)
|
||||
const [saved, setSaved] = useState(false)
|
||||
const [deleteModalOpen, setDeleteModalOpen] = useState(false)
|
||||
|
||||
const twitterAccount = props.twitterAccount;
|
||||
const profile = twitterAccount.getProfile();
|
||||
const dispatch = useDispatch();
|
||||
|
||||
// const followUser = (e, id) => {
|
||||
// e.stopPropagation()
|
||||
// console.log('Follow clicked');
|
||||
// dispatch(setFollowProfile(id));
|
||||
// }
|
||||
//
|
||||
// const unfollowUser = (e,id) => {
|
||||
// e.stopPropagation()
|
||||
// console.log('Unfollow clicked');
|
||||
// dispatch(setUnfollowProfile(id));
|
||||
// }
|
||||
|
||||
const deleteTwitterAccount = (e) => {
|
||||
e.stopPropagation()
|
||||
console.log('Delete clicked');
|
||||
dispatch(setDeleteTwitterAccount({
|
||||
twitterAccountId: twitterAccount.getTwitterAccountId(),
|
||||
}));
|
||||
}
|
||||
|
||||
const openMore = () => { setMoreMenu(!moreMenu) }
|
||||
|
||||
const handleMenuClick = (e) => { e.stopPropagation() }
|
||||
|
||||
// const toggleDeleteModal = () => {
|
||||
// setStyleBody(!styleBody)
|
||||
// setSaved(false)
|
||||
// setTimeout(()=>{ setDeleteModalOpen(!deleteModalOpen) },20)
|
||||
// }
|
||||
|
||||
return <div onClick={(e)=>e.stopPropagation()} key={profile.getPubkey()} className="search-result-wapper">
|
||||
<Link to={`/app/profile/${profile.getPubkey()}`} className="search-userPic-wrapper">
|
||||
<img style={{borderRadius:'50%', minWidth:'49px'}} width="100%" height="49px" src={`${getProfileImageSrcString(profile)}`}/>
|
||||
</Link>
|
||||
<div className="search-user-details">
|
||||
<div className="search-user-warp">
|
||||
<div className="search-user-info">
|
||||
<div className="search-user-name">{profile.getProfileName()}</div>
|
||||
<div className="search-user-username">@{profile.getPubkey()}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className="search-user-username"><b>Twitter Handle</b>: <a href={`https://twitter.com/${twitterAccount.getHandle()}`} style={{color: "blue", fontWeight: 'bold'}}>
|
||||
{twitterAccount.getHandle()}
|
||||
</a></div>
|
||||
<div className="search-user-bio">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div id="profileMoreMenu" onClick={openMore} className="Nav-link">
|
||||
<div className={"Nav-item-hover"}>
|
||||
<ICON_SETTINGS />
|
||||
</div>
|
||||
<div onClick={()=>openMore()} style={{display: moreMenu ? 'block' : 'none'}} className="more-menu-background">
|
||||
<div className="more-modal-wrapper">
|
||||
{moreMenu ?
|
||||
<div style={{
|
||||
top: document.getElementById('profileMoreMenu') && `${document.getElementById('profileMoreMenu').getBoundingClientRect().top - 40}px`,
|
||||
left: document.getElementById('profileMoreMenu') && `${document.getElementById('profileMoreMenu').getBoundingClientRect().left}px`,
|
||||
height: '40px',
|
||||
}} onClick={(e)=>handleMenuClick(e)} className="more-menu-content">
|
||||
<div onClick={deleteTwitterAccount} className="more-menu-item">
|
||||
<span>Delete</span>
|
||||
</div>
|
||||
</div> : null }
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
export default withRouter(TwitterAccountCard)
|
||||
40
frontend/src/features/twitterAccounts/TwitterAccounts.js
Normal file
40
frontend/src/features/twitterAccounts/TwitterAccounts.js
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
import React, { useEffect } from 'react'
|
||||
import { useSelector } from 'react-redux'
|
||||
import { useDispatch } from 'react-redux'
|
||||
import { withRouter, Link } from 'react-router-dom'
|
||||
import moment from 'moment'
|
||||
|
||||
import TwitterAccountCard from './TwitterAccountCard'
|
||||
import Loader from '../../components/Loader'
|
||||
|
||||
|
||||
import {
|
||||
fetchTwitterAccounts,
|
||||
clearTwitterAccounts,
|
||||
selectTwitterAccounts,
|
||||
selectTwitterAccountsStatus,
|
||||
} from './twitterAccountsSlice'
|
||||
|
||||
|
||||
const TwitterAccounts = (props) => {
|
||||
const twitterAccounts = useSelector(selectTwitterAccounts);
|
||||
const twitterAccountsStatus = useSelector(selectTwitterAccountsStatus);
|
||||
const dispatch = useDispatch();
|
||||
|
||||
useEffect(() => {
|
||||
window.scrollTo(0, 0)
|
||||
console.log('fetchTwitterAccounts');
|
||||
dispatch(clearTwitterAccounts());
|
||||
dispatch(fetchTwitterAccounts(null));
|
||||
}, [])
|
||||
|
||||
const renderedListItems = twitterAccounts.map(twitterAccount=>{
|
||||
return <TwitterAccountCard twitterAccount={twitterAccount}/>
|
||||
})
|
||||
|
||||
return <>
|
||||
{renderedListItems}
|
||||
</>
|
||||
}
|
||||
|
||||
export default withRouter(TwitterAccounts)
|
||||
120
frontend/src/features/twitterAccounts/twitterAccountsSlice.js
Normal file
120
frontend/src/features/twitterAccounts/twitterAccountsSlice.js
Normal file
|
|
@ -0,0 +1,120 @@
|
|||
import {
|
||||
createSlice,
|
||||
createSelector,
|
||||
createAsyncThunk,
|
||||
createEntityAdapter,
|
||||
} from '@reduxjs/toolkit'
|
||||
import {
|
||||
getTwitterAccounts,
|
||||
createTwitterAccount,
|
||||
deleteTwitterAccount,
|
||||
} from '../../api/client'
|
||||
|
||||
const initialState = {
|
||||
twitterAccountsStatus: 'idle',
|
||||
twitterAccounts: [],
|
||||
createTwitterAccountStatus: 'idle',
|
||||
}
|
||||
|
||||
|
||||
export const setDeleteTwitterAccount = createAsyncThunk(
|
||||
'twitterAccounts/setDeleteTwitterAccount',
|
||||
async (values) => {
|
||||
console.log('Deleting twitter account');
|
||||
let twitterAccountId = values.twitterAccountId;
|
||||
await deleteTwitterAccount(twitterAccountId);
|
||||
const response = await getTwitterAccounts();
|
||||
console.log(response);
|
||||
return response.getTwitterAccountsList();
|
||||
}
|
||||
)
|
||||
|
||||
export const fetchTwitterAccounts = createAsyncThunk(
|
||||
'twitterAccounts/fetchTwitterAccounts',
|
||||
async () => {
|
||||
const response = await getTwitterAccounts();
|
||||
console.log(response);
|
||||
return response.getTwitterAccountsList();
|
||||
}
|
||||
)
|
||||
|
||||
export const setCreateTwitterAccount = createAsyncThunk(
|
||||
'twitterAccounts/setCreateTwitterAccount',
|
||||
async (values) => {
|
||||
console.log('Creating twitter account');
|
||||
let twitterHandle = values.twitterHandle;
|
||||
let profileId = values.profileId;
|
||||
let bearerToken = values.bearerToken;
|
||||
const createResponse = await createTwitterAccount(
|
||||
twitterHandle,
|
||||
profileId,
|
||||
bearerToken,
|
||||
);
|
||||
console.log(createResponse);
|
||||
const response = await getTwitterAccounts();
|
||||
console.log(response);
|
||||
return response.getTwitterAccountsList();
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
// const updatedProfileInArray = (profileArr, newProfile) => {
|
||||
// const currentIndex = profileArr.findIndex(profile => profile.getPubkey() === newProfile.getPubkey());
|
||||
// if (currentIndex != -1) {
|
||||
// profileArr[currentIndex] = newProfile;
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
const twitterAccountsSlice = createSlice({
|
||||
name: 'twitterAccounts',
|
||||
initialState,
|
||||
reducers: {
|
||||
clearTwitterAccounts(state, action) {
|
||||
state.createTwitterAccountStatus = 'idle'
|
||||
state.twitterAccounts = [];
|
||||
},
|
||||
},
|
||||
extraReducers: (builder) => {
|
||||
builder
|
||||
.addCase(fetchTwitterAccounts.pending, (state, action) => {
|
||||
state.twitterAccountsStatus = 'loading'
|
||||
})
|
||||
.addCase(fetchTwitterAccounts.fulfilled, (state, action) => {
|
||||
const newTwitterAccounts = action.payload;
|
||||
state.twitterAccounts = newTwitterAccounts;
|
||||
state.twitterAccountsStatus = 'idle'
|
||||
})
|
||||
.addCase(setCreateTwitterAccount.pending, (state, action) => {
|
||||
console.log('setCreateTwitterAccount pending');
|
||||
state.createTwitterAccountStatus = 'loading'
|
||||
})
|
||||
.addCase(setCreateTwitterAccount.fulfilled, (state, action) => {
|
||||
console.log('setCreateTwitterAccount fulfilled');
|
||||
console.log(action);
|
||||
const newTwitterAccounts = action.payload;
|
||||
state.twitterAccounts = newTwitterAccounts;
|
||||
state.twitterAccountsStatus = 'idle'
|
||||
state.createTwitterAccountStatus = 'idle';
|
||||
})
|
||||
.addCase(setDeleteTwitterAccount.fulfilled, (state, action) => {
|
||||
console.log(action);
|
||||
const newTwitterAccounts = action.payload;
|
||||
state.twitterAccounts = newTwitterAccounts;
|
||||
state.twitterAccountsStatus = 'idle'
|
||||
|
||||
})
|
||||
},
|
||||
})
|
||||
|
||||
export const {
|
||||
clearTwitterAccounts,
|
||||
} = twitterAccountsSlice.actions
|
||||
|
||||
export default twitterAccountsSlice.reducer
|
||||
|
||||
export const selectTwitterAccountsStatus = state => state.twitterAccounts.twitterAccountsStatus
|
||||
|
||||
export const selectTwitterAccounts = state => state.twitterAccounts.twitterAccounts
|
||||
|
||||
export const selectCreateTwitterAccountStatus = state => state.twitterAccounts.createTwitterAccountStatus
|
||||
|
|
@ -8,6 +8,7 @@ import externalAddressReducer from './features/externalAddress/externalAddressSl
|
|||
import paymentsReducer from './features/payments/paymentsSlice'
|
||||
import sellPriceReducer from './features/sellPrice/sellPriceSlice'
|
||||
import accountReducer from './features/account/accountSlice'
|
||||
import twitterAccounsReducer from './features/twitterAccounts/twitterAccountsSlice'
|
||||
|
||||
const store = configureStore({
|
||||
reducer: {
|
||||
|
|
@ -19,6 +20,7 @@ const store = configureStore({
|
|||
payments: paymentsReducer,
|
||||
sellPrice: sellPriceReducer,
|
||||
account: accountReducer,
|
||||
twitterAccounts: twitterAccounsReducer,
|
||||
},
|
||||
})
|
||||
|
||||
|
|
|
|||
|
|
@ -1,35 +1,35 @@
|
|||
{
|
||||
"files": {
|
||||
"main.css": "/static/css/main.af20da16.chunk.css",
|
||||
"main.js": "/static/js/main.43e8a892.chunk.js",
|
||||
"main.js.map": "/static/js/main.43e8a892.chunk.js.map",
|
||||
"runtime-main.js": "/static/js/runtime-main.c2d88949.js",
|
||||
"runtime-main.js.map": "/static/js/runtime-main.c2d88949.js.map",
|
||||
"static/js/2.efd8ed9d.chunk.js": "/static/js/2.efd8ed9d.chunk.js",
|
||||
"static/js/2.efd8ed9d.chunk.js.map": "/static/js/2.efd8ed9d.chunk.js.map",
|
||||
"main.css": "/static/css/main.6b2fbaff.chunk.css",
|
||||
"main.js": "/static/js/main.1709487d.chunk.js",
|
||||
"main.js.map": "/static/js/main.1709487d.chunk.js.map",
|
||||
"runtime-main.js": "/static/js/runtime-main.cf643d5e.js",
|
||||
"runtime-main.js.map": "/static/js/runtime-main.cf643d5e.js.map",
|
||||
"static/js/2.9336a0d0.chunk.js": "/static/js/2.9336a0d0.chunk.js",
|
||||
"static/js/2.9336a0d0.chunk.js.map": "/static/js/2.9336a0d0.chunk.js.map",
|
||||
"static/css/3.1f6bb621.chunk.css": "/static/css/3.1f6bb621.chunk.css",
|
||||
"static/js/3.92446fb0.chunk.js": "/static/js/3.92446fb0.chunk.js",
|
||||
"static/js/3.92446fb0.chunk.js.map": "/static/js/3.92446fb0.chunk.js.map",
|
||||
"static/js/3.79deefcb.chunk.js": "/static/js/3.79deefcb.chunk.js",
|
||||
"static/js/3.79deefcb.chunk.js.map": "/static/js/3.79deefcb.chunk.js.map",
|
||||
"static/css/4.6512f3a3.chunk.css": "/static/css/4.6512f3a3.chunk.css",
|
||||
"static/js/4.ab2b1a69.chunk.js": "/static/js/4.ab2b1a69.chunk.js",
|
||||
"static/js/4.ab2b1a69.chunk.js.map": "/static/js/4.ab2b1a69.chunk.js.map",
|
||||
"static/js/4.ea7fc71b.chunk.js": "/static/js/4.ea7fc71b.chunk.js",
|
||||
"static/js/4.ea7fc71b.chunk.js.map": "/static/js/4.ea7fc71b.chunk.js.map",
|
||||
"static/css/5.3aaab79d.chunk.css": "/static/css/5.3aaab79d.chunk.css",
|
||||
"static/js/5.0a538691.chunk.js": "/static/js/5.0a538691.chunk.js",
|
||||
"static/js/5.0a538691.chunk.js.map": "/static/js/5.0a538691.chunk.js.map",
|
||||
"static/js/5.a9bd75b8.chunk.js": "/static/js/5.a9bd75b8.chunk.js",
|
||||
"static/js/5.a9bd75b8.chunk.js.map": "/static/js/5.a9bd75b8.chunk.js.map",
|
||||
"index.html": "/index.html",
|
||||
"precache-manifest.cfb9b2fbb1308e3b0f1e4d95184e56a0.js": "/precache-manifest.cfb9b2fbb1308e3b0f1e4d95184e56a0.js",
|
||||
"precache-manifest.870a9e1208d76edf8f15550442969c46.js": "/precache-manifest.870a9e1208d76edf8f15550442969c46.js",
|
||||
"service-worker.js": "/service-worker.js",
|
||||
"static/css/3.1f6bb621.chunk.css.map": "/static/css/3.1f6bb621.chunk.css.map",
|
||||
"static/css/4.6512f3a3.chunk.css.map": "/static/css/4.6512f3a3.chunk.css.map",
|
||||
"static/css/5.3aaab79d.chunk.css.map": "/static/css/5.3aaab79d.chunk.css.map",
|
||||
"static/css/main.af20da16.chunk.css.map": "/static/css/main.af20da16.chunk.css.map",
|
||||
"static/js/2.efd8ed9d.chunk.js.LICENSE.txt": "/static/js/2.efd8ed9d.chunk.js.LICENSE.txt",
|
||||
"static/css/main.6b2fbaff.chunk.css.map": "/static/css/main.6b2fbaff.chunk.css.map",
|
||||
"static/js/2.9336a0d0.chunk.js.LICENSE.txt": "/static/js/2.9336a0d0.chunk.js.LICENSE.txt",
|
||||
"static/media/icon.a0c2d343.svg": "/static/media/icon.a0c2d343.svg"
|
||||
},
|
||||
"entrypoints": [
|
||||
"static/js/runtime-main.c2d88949.js",
|
||||
"static/js/2.efd8ed9d.chunk.js",
|
||||
"static/css/main.af20da16.chunk.css",
|
||||
"static/js/main.43e8a892.chunk.js"
|
||||
"static/js/runtime-main.cf643d5e.js",
|
||||
"static/js/2.9336a0d0.chunk.js",
|
||||
"static/css/main.6b2fbaff.chunk.css",
|
||||
"static/js/main.1709487d.chunk.js"
|
||||
]
|
||||
}
|
||||
|
|
@ -1 +1 @@
|
|||
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#1da1f2"/><meta nam="description" content="Squeaknode!"/><meta name="og:title" content="Squeaknode"/><meta name="og:description" content="check out my the Squeaknode I made"/><link href="https://fonts.googleapis.com/css2?family=Assistant&display=swap" rel="stylesheet"><link rel="apple-touch-icon" href="/logo192.png"/><link rel="manifest" href="/manifest.json"/><title>Squeaknode</title><link href="/static/css/main.af20da16.chunk.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><script>!function(e){function t(t){for(var n,o,i=t[0],c=t[1],l=t[2],s=0,p=[];s<i.length;s++)o=i[s],Object.prototype.hasOwnProperty.call(a,o)&&a[o]&&p.push(a[o][0]),a[o]=0;for(n in c)Object.prototype.hasOwnProperty.call(c,n)&&(e[n]=c[n]);for(f&&f(t);p.length;)p.shift()();return u.push.apply(u,l||[]),r()}function r(){for(var e,t=0;t<u.length;t++){for(var r=u[t],n=!0,o=1;o<r.length;o++){var c=r[o];0!==a[c]&&(n=!1)}n&&(u.splice(t--,1),e=i(i.s=r[0]))}return e}var n={},o={1:0},a={1:0},u=[];function i(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,i),r.l=!0,r.exports}i.e=function(e){var t=[];o[e]?t.push(o[e]):0!==o[e]&&{3:1,4:1,5:1}[e]&&t.push(o[e]=new Promise((function(t,r){for(var n="static/css/"+({}[e]||e)+"."+{3:"1f6bb621",4:"6512f3a3",5:"3aaab79d"}[e]+".chunk.css",a=i.p+n,u=document.getElementsByTagName("link"),c=0;c<u.length;c++){var l=(f=u[c]).getAttribute("data-href")||f.getAttribute("href");if("stylesheet"===f.rel&&(l===n||l===a))return t()}var s=document.getElementsByTagName("style");for(c=0;c<s.length;c++){var f;if((l=(f=s[c]).getAttribute("data-href"))===n||l===a)return t()}var p=document.createElement("link");p.rel="stylesheet",p.type="text/css",p.onload=t,p.onerror=function(t){var n=t&&t.target&&t.target.src||a,u=new Error("Loading CSS chunk "+e+" failed.\n("+n+")");u.code="CSS_CHUNK_LOAD_FAILED",u.request=n,delete o[e],p.parentNode.removeChild(p),r(u)},p.href=a,document.getElementsByTagName("head")[0].appendChild(p)})).then((function(){o[e]=0})));var r=a[e];if(0!==r)if(r)t.push(r[2]);else{var n=new Promise((function(t,n){r=a[e]=[t,n]}));t.push(r[2]=n);var u,c=document.createElement("script");c.charset="utf-8",c.timeout=120,i.nc&&c.setAttribute("nonce",i.nc),c.src=function(e){return i.p+"static/js/"+({}[e]||e)+"."+{3:"92446fb0",4:"ab2b1a69",5:"0a538691"}[e]+".chunk.js"}(e);var l=new Error;u=function(t){c.onerror=c.onload=null,clearTimeout(s);var r=a[e];if(0!==r){if(r){var n=t&&("load"===t.type?"missing":t.type),o=t&&t.target&&t.target.src;l.message="Loading chunk "+e+" failed.\n("+n+": "+o+")",l.name="ChunkLoadError",l.type=n,l.request=o,r[1](l)}a[e]=void 0}};var s=setTimeout((function(){u({type:"timeout",target:c})}),12e4);c.onerror=c.onload=u,document.head.appendChild(c)}return Promise.all(t)},i.m=e,i.c=n,i.d=function(e,t,r){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(i.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)i.d(r,n,function(t){return e[t]}.bind(null,n));return r},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="/",i.oe=function(e){throw console.error(e),e};var c=this["webpackJsonptwitter-frontend"]=this["webpackJsonptwitter-frontend"]||[],l=c.push.bind(c);c.push=t,c=c.slice();for(var s=0;s<c.length;s++)t(c[s]);var f=l;r()}([])</script><script src="/static/js/2.efd8ed9d.chunk.js"></script><script src="/static/js/main.43e8a892.chunk.js"></script></body></html>
|
||||
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#1da1f2"/><meta nam="description" content="Squeaknode!"/><meta name="og:title" content="Squeaknode"/><meta name="og:description" content="check out my the Squeaknode I made"/><link href="https://fonts.googleapis.com/css2?family=Assistant&display=swap" rel="stylesheet"><link rel="apple-touch-icon" href="/logo192.png"/><link rel="manifest" href="/manifest.json"/><title>Squeaknode</title><link href="/static/css/main.6b2fbaff.chunk.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><script>!function(e){function t(t){for(var n,o,i=t[0],c=t[1],l=t[2],f=0,d=[];f<i.length;f++)o=i[f],Object.prototype.hasOwnProperty.call(a,o)&&a[o]&&d.push(a[o][0]),a[o]=0;for(n in c)Object.prototype.hasOwnProperty.call(c,n)&&(e[n]=c[n]);for(s&&s(t);d.length;)d.shift()();return u.push.apply(u,l||[]),r()}function r(){for(var e,t=0;t<u.length;t++){for(var r=u[t],n=!0,o=1;o<r.length;o++){var c=r[o];0!==a[c]&&(n=!1)}n&&(u.splice(t--,1),e=i(i.s=r[0]))}return e}var n={},o={1:0},a={1:0},u=[];function i(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,i),r.l=!0,r.exports}i.e=function(e){var t=[];o[e]?t.push(o[e]):0!==o[e]&&{3:1,4:1,5:1}[e]&&t.push(o[e]=new Promise((function(t,r){for(var n="static/css/"+({}[e]||e)+"."+{3:"1f6bb621",4:"6512f3a3",5:"3aaab79d"}[e]+".chunk.css",a=i.p+n,u=document.getElementsByTagName("link"),c=0;c<u.length;c++){var l=(s=u[c]).getAttribute("data-href")||s.getAttribute("href");if("stylesheet"===s.rel&&(l===n||l===a))return t()}var f=document.getElementsByTagName("style");for(c=0;c<f.length;c++){var s;if((l=(s=f[c]).getAttribute("data-href"))===n||l===a)return t()}var d=document.createElement("link");d.rel="stylesheet",d.type="text/css",d.onload=t,d.onerror=function(t){var n=t&&t.target&&t.target.src||a,u=new Error("Loading CSS chunk "+e+" failed.\n("+n+")");u.code="CSS_CHUNK_LOAD_FAILED",u.request=n,delete o[e],d.parentNode.removeChild(d),r(u)},d.href=a,document.getElementsByTagName("head")[0].appendChild(d)})).then((function(){o[e]=0})));var r=a[e];if(0!==r)if(r)t.push(r[2]);else{var n=new Promise((function(t,n){r=a[e]=[t,n]}));t.push(r[2]=n);var u,c=document.createElement("script");c.charset="utf-8",c.timeout=120,i.nc&&c.setAttribute("nonce",i.nc),c.src=function(e){return i.p+"static/js/"+({}[e]||e)+"."+{3:"79deefcb",4:"ea7fc71b",5:"a9bd75b8"}[e]+".chunk.js"}(e);var l=new Error;u=function(t){c.onerror=c.onload=null,clearTimeout(f);var r=a[e];if(0!==r){if(r){var n=t&&("load"===t.type?"missing":t.type),o=t&&t.target&&t.target.src;l.message="Loading chunk "+e+" failed.\n("+n+": "+o+")",l.name="ChunkLoadError",l.type=n,l.request=o,r[1](l)}a[e]=void 0}};var f=setTimeout((function(){u({type:"timeout",target:c})}),12e4);c.onerror=c.onload=u,document.head.appendChild(c)}return Promise.all(t)},i.m=e,i.c=n,i.d=function(e,t,r){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(i.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)i.d(r,n,function(t){return e[t]}.bind(null,n));return r},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="/",i.oe=function(e){throw console.error(e),e};var c=this["webpackJsonptwitter-frontend"]=this["webpackJsonptwitter-frontend"]||[],l=c.push.bind(c);c.push=t,c=c.slice();for(var f=0;f<c.length;f++)t(c[f]);var s=l;r()}([])</script><script src="/static/js/2.9336a0d0.chunk.js"></script><script src="/static/js/main.1709487d.chunk.js"></script></body></html>
|
||||
|
|
@ -0,0 +1,54 @@
|
|||
self.__precacheManifest = (self.__precacheManifest || []).concat([
|
||||
{
|
||||
"revision": "728a1bc2adf2c270f4f9875b980e46e3",
|
||||
"url": "/index.html"
|
||||
},
|
||||
{
|
||||
"revision": "d16c5b902c9c2c0ffb0d",
|
||||
"url": "/static/css/3.1f6bb621.chunk.css"
|
||||
},
|
||||
{
|
||||
"revision": "9ac08b30bcd53c3ac912",
|
||||
"url": "/static/css/4.6512f3a3.chunk.css"
|
||||
},
|
||||
{
|
||||
"revision": "bd959cd5d3ee66db00df",
|
||||
"url": "/static/css/5.3aaab79d.chunk.css"
|
||||
},
|
||||
{
|
||||
"revision": "50306382de0dc8fca651",
|
||||
"url": "/static/css/main.6b2fbaff.chunk.css"
|
||||
},
|
||||
{
|
||||
"revision": "f31dc6db2fb779e04f56",
|
||||
"url": "/static/js/2.9336a0d0.chunk.js"
|
||||
},
|
||||
{
|
||||
"revision": "a569361d31625f49e7e30aea21628ed5",
|
||||
"url": "/static/js/2.9336a0d0.chunk.js.LICENSE.txt"
|
||||
},
|
||||
{
|
||||
"revision": "d16c5b902c9c2c0ffb0d",
|
||||
"url": "/static/js/3.79deefcb.chunk.js"
|
||||
},
|
||||
{
|
||||
"revision": "9ac08b30bcd53c3ac912",
|
||||
"url": "/static/js/4.ea7fc71b.chunk.js"
|
||||
},
|
||||
{
|
||||
"revision": "bd959cd5d3ee66db00df",
|
||||
"url": "/static/js/5.a9bd75b8.chunk.js"
|
||||
},
|
||||
{
|
||||
"revision": "50306382de0dc8fca651",
|
||||
"url": "/static/js/main.1709487d.chunk.js"
|
||||
},
|
||||
{
|
||||
"revision": "ee7d89b28c6db246f9bb",
|
||||
"url": "/static/js/runtime-main.cf643d5e.js"
|
||||
},
|
||||
{
|
||||
"revision": "a0c2d343127a93b025409da6fd970700",
|
||||
"url": "/static/media/icon.a0c2d343.svg"
|
||||
}
|
||||
]);
|
||||
|
|
@ -1,54 +0,0 @@
|
|||
self.__precacheManifest = (self.__precacheManifest || []).concat([
|
||||
{
|
||||
"revision": "6dc768de43070165e0d68c1167a00794",
|
||||
"url": "/index.html"
|
||||
},
|
||||
{
|
||||
"revision": "73c7ea2a353c494adc0a",
|
||||
"url": "/static/css/3.1f6bb621.chunk.css"
|
||||
},
|
||||
{
|
||||
"revision": "6fc37c8992a6520f33af",
|
||||
"url": "/static/css/4.6512f3a3.chunk.css"
|
||||
},
|
||||
{
|
||||
"revision": "cf4e7dfb7dadb7012f14",
|
||||
"url": "/static/css/5.3aaab79d.chunk.css"
|
||||
},
|
||||
{
|
||||
"revision": "b9c84cc33c04acb5b443",
|
||||
"url": "/static/css/main.af20da16.chunk.css"
|
||||
},
|
||||
{
|
||||
"revision": "e90e5d10a6f5796c5fc4",
|
||||
"url": "/static/js/2.efd8ed9d.chunk.js"
|
||||
},
|
||||
{
|
||||
"revision": "a569361d31625f49e7e30aea21628ed5",
|
||||
"url": "/static/js/2.efd8ed9d.chunk.js.LICENSE.txt"
|
||||
},
|
||||
{
|
||||
"revision": "73c7ea2a353c494adc0a",
|
||||
"url": "/static/js/3.92446fb0.chunk.js"
|
||||
},
|
||||
{
|
||||
"revision": "6fc37c8992a6520f33af",
|
||||
"url": "/static/js/4.ab2b1a69.chunk.js"
|
||||
},
|
||||
{
|
||||
"revision": "cf4e7dfb7dadb7012f14",
|
||||
"url": "/static/js/5.0a538691.chunk.js"
|
||||
},
|
||||
{
|
||||
"revision": "b9c84cc33c04acb5b443",
|
||||
"url": "/static/js/main.43e8a892.chunk.js"
|
||||
},
|
||||
{
|
||||
"revision": "1f118fd0abfd7f5796a5",
|
||||
"url": "/static/js/runtime-main.c2d88949.js"
|
||||
},
|
||||
{
|
||||
"revision": "a0c2d343127a93b025409da6fd970700",
|
||||
"url": "/static/media/icon.a0c2d343.svg"
|
||||
}
|
||||
]);
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
importScripts("https://storage.googleapis.com/workbox-cdn/releases/4.3.1/workbox-sw.js");
|
||||
|
||||
importScripts(
|
||||
"/precache-manifest.cfb9b2fbb1308e3b0f1e4d95184e56a0.js"
|
||||
"/precache-manifest.870a9e1208d76edf8f15550442969c46.js"
|
||||
);
|
||||
|
||||
self.addEventListener('message', (event) => {
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -1,2 +1,2 @@
|
|||
(this["webpackJsonptwitter-frontend"]=this["webpackJsonptwitter-frontend"]||[]).push([[3],{133:function(e,t,a){},138:function(e,t,a){"use strict";a.r(t);var n=a(0),c=a.n(n),l=(a(133),a(38),a(32),a(7),a(37),a(12)),r=a(19),s=a(33),i=a(4),u=a(11),o=(a(40),function(){var e=Object(i.c)(u.C),t=Object(i.c)(u.D),a=Object(i.c)(u.t),s=Object(i.b)();Object(n.useEffect)((function(){window.scrollTo(0,0),console.log("fetchTodos"),s(Object(u.c)()),s(Object(u.k)({limit:10,lastSqueak:null}))}),[]);var o=e.map((function(e){return c.a.createElement(r.a,{squeak:e,key:e.getSqueakHash(),id:e.getSqueakHash(),user:e.getAuthor()})}));return c.a.createElement(c.a.Fragment,null,c.a.createElement("ul",{className:"todo-list"},o),"loading"===t?c.a.createElement("div",{className:"todo-list"},c.a.createElement(l.a,null)):c.a.createElement("div",{onClick:function(){s(Object(u.k)({limit:10,lastSqueak:a}))},className:"squeak-btn-side squeak-btn-active"},"LOAD MORE"))});t.default=function(){return c.a.createElement("div",{className:"Home-wrapper"},c.a.createElement("div",{className:"Home-header-wrapper"},c.a.createElement("h2",{className:"Home-header"},"Latest Squeaks")),c.a.createElement(s.a,null),c.a.createElement("div",{className:"Squeak-input-divider"}),c.a.createElement(o,null))}}}]);
|
||||
//# sourceMappingURL=3.92446fb0.chunk.js.map
|
||||
(this["webpackJsonptwitter-frontend"]=this["webpackJsonptwitter-frontend"]||[]).push([[3],{135:function(e,t,a){},140:function(e,t,a){"use strict";a.r(t);var n=a(0),c=a.n(n),l=(a(135),a(40),a(33),a(8),a(39),a(12)),r=a(18),s=a(34),i=a(3),u=a(11),o=(a(42),function(){var e=Object(i.c)(u.C),t=Object(i.c)(u.D),a=Object(i.c)(u.t),s=Object(i.b)();Object(n.useEffect)((function(){window.scrollTo(0,0),console.log("fetchTodos"),s(Object(u.c)()),s(Object(u.k)({limit:10,lastSqueak:null}))}),[]);var o=e.map((function(e){return c.a.createElement(r.a,{squeak:e,key:e.getSqueakHash(),id:e.getSqueakHash(),user:e.getAuthor()})}));return c.a.createElement(c.a.Fragment,null,c.a.createElement("ul",{className:"todo-list"},o),"loading"===t?c.a.createElement("div",{className:"todo-list"},c.a.createElement(l.a,null)):c.a.createElement("div",{onClick:function(){s(Object(u.k)({limit:10,lastSqueak:a}))},className:"squeak-btn-side squeak-btn-active"},"LOAD MORE"))});t.default=function(){return c.a.createElement("div",{className:"Home-wrapper"},c.a.createElement("div",{className:"Home-header-wrapper"},c.a.createElement("h2",{className:"Home-header"},"Latest Squeaks")),c.a.createElement(s.a,null),c.a.createElement("div",{className:"Squeak-input-divider"}),c.a.createElement(o,null))}}}]);
|
||||
//# sourceMappingURL=3.79deefcb.chunk.js.map
|
||||
|
|
@ -1 +1 @@
|
|||
{"version":3,"sources":["features/squeaks/Timeline.js","components/Home/index.js"],"names":["Timeline","squeaks","useSelector","selectTimelineSqueaks","loadingStatus","selectTimelineSqueaksStatus","lastSqueak","selectLastTimelineSqueak","dispatch","useDispatch","useEffect","window","scrollTo","console","log","clearTimeline","fetchTimeline","limit","renderedListItems","map","squeak","SqueakCard","key","getSqueakHash","id","user","getAuthor","className","Loader","onClick","Home","MakeSqueak"],"mappings":"oPA+DeA,G,MA5CE,WACf,IAAMC,EAAUC,YAAYC,KACtBC,EAAgBF,YAAYG,KAC5BC,EAAaJ,YAAYK,KACzBC,EAAWC,cAEjBC,qBAAU,WACNC,OAAOC,SAAS,EAAG,GACnBC,QAAQC,IAAI,cACZN,EAASO,eACTP,EAASQ,YAAc,CACrBC,MAAO,GACPX,WAAY,UAEf,IAEH,IAQMY,EAAoBjB,EAAQkB,KAAI,SAACC,GACrC,OAAO,kBAACC,EAAA,EAAD,CAAYD,OAAQA,EAAQE,IAAKF,EAAOG,gBAAiBC,GAAIJ,EAAOG,gBAAiBE,KAAML,EAAOM,iBAG3G,OAAO,oCACC,wBAAIC,UAAU,aAAaT,GAER,YAAlBd,EACD,yBAAKuB,UAAU,aACb,kBAACC,EAAA,EAAD,OAGF,yBAAKC,QAAS,WAnBpBrB,EAASQ,YAAc,CACrBC,MAAO,GACPX,WAAYA,MAiByBqB,UAAU,qCAA3C,gBCtBKG,UAlBF,WAET,OACI,yBAAKH,UAAU,gBACX,yBAAKA,UAAU,uBACX,wBAAIA,UAAU,eAAd,mBAIJ,kBAACI,EAAA,EAAD,MACA,yBAAKJ,UAAU,yBAEf,kBAAC,EAAD","file":"static/js/3.92446fb0.chunk.js","sourcesContent":["import React, { useEffect } from 'react'\nimport { useSelector } from 'react-redux'\nimport { useDispatch } from 'react-redux'\n\nimport SqueakCard from '../../components/SqueakCard'\nimport Loader from '../../components/Loader'\n\n\nimport {\n fetchTimeline,\n selectTimelineSqueaks,\n selectTimelineSqueaksStatus,\n selectLastTimelineSqueak,\n clearTimeline,\n} from '../squeaks/squeaksSlice'\n\nimport store from '../../store'\n\n\nconst Timeline = () => {\n const squeaks = useSelector(selectTimelineSqueaks);\n const loadingStatus = useSelector(selectTimelineSqueaksStatus)\n const lastSqueak = useSelector(selectLastTimelineSqueak)\n const dispatch = useDispatch()\n\n useEffect(() => {\n window.scrollTo(0, 0)\n console.log('fetchTodos');\n dispatch(clearTimeline());\n dispatch(fetchTimeline({\n limit: 10,\n lastSqueak: null,\n }));\n }, [])\n\n const fetchMore = () => {\n dispatch(fetchTimeline({\n limit: 10,\n lastSqueak: lastSqueak,\n }));\n }\n\n\n const renderedListItems = squeaks.map((squeak) => {\n return <SqueakCard squeak={squeak} key={squeak.getSqueakHash()} id={squeak.getSqueakHash()} user={squeak.getAuthor()} />\n })\n\n return <>\n <ul className=\"todo-list\">{renderedListItems}</ul>\n\n {loadingStatus === 'loading' ?\n <div className=\"todo-list\">\n <Loader />\n </div>\n :\n <div onClick={() => fetchMore()} className='squeak-btn-side squeak-btn-active'>\n LOAD MORE\n </div>\n }\n\n </>\n}\n\nexport default Timeline\n","import React, { useEffect, useState, useContext, useRef } from 'react'\r\nimport './style.scss'\r\nimport axios from 'axios'\r\nimport ContentEditable from 'react-contenteditable'\r\nimport { ICON_IMGUPLOAD } from '../../Icons'\r\nimport { Link } from 'react-router-dom'\r\nimport { API_URL } from '../../config'\r\nimport Loader from '../Loader'\r\nimport SqueakCard from '../SqueakCard'\r\n//import MakeSqueak from '../MakeSqueak'\r\nimport MakeSqueak from '../../features/squeaks/MakeSqueak'\r\nimport Timeline from '../../features/squeaks/Timeline'\r\n\r\n\r\n\r\nconst Home = () => {\r\n\r\n return (\r\n <div className=\"Home-wrapper\">\r\n <div className=\"Home-header-wrapper\">\r\n <h2 className=\"Home-header\">\r\n Latest Squeaks\r\n </h2>\r\n </div>\r\n <MakeSqueak />\r\n <div className=\"Squeak-input-divider\"></div>\r\n\r\n <Timeline />\r\n\r\n </div>\r\n )\r\n}\r\n\r\nexport default Home\r\n"],"sourceRoot":""}
|
||||
{"version":3,"sources":["features/squeaks/Timeline.js","components/Home/index.js"],"names":["Timeline","squeaks","useSelector","selectTimelineSqueaks","loadingStatus","selectTimelineSqueaksStatus","lastSqueak","selectLastTimelineSqueak","dispatch","useDispatch","useEffect","window","scrollTo","console","log","clearTimeline","fetchTimeline","limit","renderedListItems","map","squeak","SqueakCard","key","getSqueakHash","id","user","getAuthor","className","Loader","onClick","Home","MakeSqueak"],"mappings":"oPA+DeA,G,MA5CE,WACf,IAAMC,EAAUC,YAAYC,KACtBC,EAAgBF,YAAYG,KAC5BC,EAAaJ,YAAYK,KACzBC,EAAWC,cAEjBC,qBAAU,WACNC,OAAOC,SAAS,EAAG,GACnBC,QAAQC,IAAI,cACZN,EAASO,eACTP,EAASQ,YAAc,CACrBC,MAAO,GACPX,WAAY,UAEf,IAEH,IAQMY,EAAoBjB,EAAQkB,KAAI,SAACC,GACrC,OAAO,kBAACC,EAAA,EAAD,CAAYD,OAAQA,EAAQE,IAAKF,EAAOG,gBAAiBC,GAAIJ,EAAOG,gBAAiBE,KAAML,EAAOM,iBAG3G,OAAO,oCACC,wBAAIC,UAAU,aAAaT,GAER,YAAlBd,EACD,yBAAKuB,UAAU,aACb,kBAACC,EAAA,EAAD,OAGF,yBAAKC,QAAS,WAnBpBrB,EAASQ,YAAc,CACrBC,MAAO,GACPX,WAAYA,MAiByBqB,UAAU,qCAA3C,gBCtBKG,UAlBF,WAET,OACI,yBAAKH,UAAU,gBACX,yBAAKA,UAAU,uBACX,wBAAIA,UAAU,eAAd,mBAIJ,kBAACI,EAAA,EAAD,MACA,yBAAKJ,UAAU,yBAEf,kBAAC,EAAD","file":"static/js/3.79deefcb.chunk.js","sourcesContent":["import React, { useEffect } from 'react'\nimport { useSelector } from 'react-redux'\nimport { useDispatch } from 'react-redux'\n\nimport SqueakCard from '../../components/SqueakCard'\nimport Loader from '../../components/Loader'\n\n\nimport {\n fetchTimeline,\n selectTimelineSqueaks,\n selectTimelineSqueaksStatus,\n selectLastTimelineSqueak,\n clearTimeline,\n} from '../squeaks/squeaksSlice'\n\nimport store from '../../store'\n\n\nconst Timeline = () => {\n const squeaks = useSelector(selectTimelineSqueaks);\n const loadingStatus = useSelector(selectTimelineSqueaksStatus)\n const lastSqueak = useSelector(selectLastTimelineSqueak)\n const dispatch = useDispatch()\n\n useEffect(() => {\n window.scrollTo(0, 0)\n console.log('fetchTodos');\n dispatch(clearTimeline());\n dispatch(fetchTimeline({\n limit: 10,\n lastSqueak: null,\n }));\n }, [])\n\n const fetchMore = () => {\n dispatch(fetchTimeline({\n limit: 10,\n lastSqueak: lastSqueak,\n }));\n }\n\n\n const renderedListItems = squeaks.map((squeak) => {\n return <SqueakCard squeak={squeak} key={squeak.getSqueakHash()} id={squeak.getSqueakHash()} user={squeak.getAuthor()} />\n })\n\n return <>\n <ul className=\"todo-list\">{renderedListItems}</ul>\n\n {loadingStatus === 'loading' ?\n <div className=\"todo-list\">\n <Loader />\n </div>\n :\n <div onClick={() => fetchMore()} className='squeak-btn-side squeak-btn-active'>\n LOAD MORE\n </div>\n }\n\n </>\n}\n\nexport default Timeline\n","import React, { useEffect, useState, useContext, useRef } from 'react'\r\nimport './style.scss'\r\nimport axios from 'axios'\r\nimport ContentEditable from 'react-contenteditable'\r\nimport { ICON_IMGUPLOAD } from '../../Icons'\r\nimport { Link } from 'react-router-dom'\r\nimport { API_URL } from '../../config'\r\nimport Loader from '../Loader'\r\nimport SqueakCard from '../SqueakCard'\r\n//import MakeSqueak from '../MakeSqueak'\r\nimport MakeSqueak from '../../features/squeaks/MakeSqueak'\r\nimport Timeline from '../../features/squeaks/Timeline'\r\n\r\n\r\n\r\nconst Home = () => {\r\n\r\n return (\r\n <div className=\"Home-wrapper\">\r\n <div className=\"Home-header-wrapper\">\r\n <h2 className=\"Home-header\">\r\n Latest Squeaks\r\n </h2>\r\n </div>\r\n <MakeSqueak />\r\n <div className=\"Squeak-input-divider\"></div>\r\n\r\n <Timeline />\r\n\r\n </div>\r\n )\r\n}\r\n\r\nexport default Home\r\n"],"sourceRoot":""}
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -1,2 +1,2 @@
|
|||
!function(e){function t(t){for(var n,o,i=t[0],c=t[1],l=t[2],s=0,p=[];s<i.length;s++)o=i[s],Object.prototype.hasOwnProperty.call(a,o)&&a[o]&&p.push(a[o][0]),a[o]=0;for(n in c)Object.prototype.hasOwnProperty.call(c,n)&&(e[n]=c[n]);for(f&&f(t);p.length;)p.shift()();return u.push.apply(u,l||[]),r()}function r(){for(var e,t=0;t<u.length;t++){for(var r=u[t],n=!0,o=1;o<r.length;o++){var c=r[o];0!==a[c]&&(n=!1)}n&&(u.splice(t--,1),e=i(i.s=r[0]))}return e}var n={},o={1:0},a={1:0},u=[];function i(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,i),r.l=!0,r.exports}i.e=function(e){var t=[];o[e]?t.push(o[e]):0!==o[e]&&{3:1,4:1,5:1}[e]&&t.push(o[e]=new Promise((function(t,r){for(var n="static/css/"+({}[e]||e)+"."+{3:"1f6bb621",4:"6512f3a3",5:"3aaab79d"}[e]+".chunk.css",a=i.p+n,u=document.getElementsByTagName("link"),c=0;c<u.length;c++){var l=(f=u[c]).getAttribute("data-href")||f.getAttribute("href");if("stylesheet"===f.rel&&(l===n||l===a))return t()}var s=document.getElementsByTagName("style");for(c=0;c<s.length;c++){var f;if((l=(f=s[c]).getAttribute("data-href"))===n||l===a)return t()}var p=document.createElement("link");p.rel="stylesheet",p.type="text/css",p.onload=t,p.onerror=function(t){var n=t&&t.target&&t.target.src||a,u=new Error("Loading CSS chunk "+e+" failed.\n("+n+")");u.code="CSS_CHUNK_LOAD_FAILED",u.request=n,delete o[e],p.parentNode.removeChild(p),r(u)},p.href=a,document.getElementsByTagName("head")[0].appendChild(p)})).then((function(){o[e]=0})));var r=a[e];if(0!==r)if(r)t.push(r[2]);else{var n=new Promise((function(t,n){r=a[e]=[t,n]}));t.push(r[2]=n);var u,c=document.createElement("script");c.charset="utf-8",c.timeout=120,i.nc&&c.setAttribute("nonce",i.nc),c.src=function(e){return i.p+"static/js/"+({}[e]||e)+"."+{3:"92446fb0",4:"ab2b1a69",5:"0a538691"}[e]+".chunk.js"}(e);var l=new Error;u=function(t){c.onerror=c.onload=null,clearTimeout(s);var r=a[e];if(0!==r){if(r){var n=t&&("load"===t.type?"missing":t.type),o=t&&t.target&&t.target.src;l.message="Loading chunk "+e+" failed.\n("+n+": "+o+")",l.name="ChunkLoadError",l.type=n,l.request=o,r[1](l)}a[e]=void 0}};var s=setTimeout((function(){u({type:"timeout",target:c})}),12e4);c.onerror=c.onload=u,document.head.appendChild(c)}return Promise.all(t)},i.m=e,i.c=n,i.d=function(e,t,r){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},i.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(i.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)i.d(r,n,function(t){return e[t]}.bind(null,n));return r},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="/",i.oe=function(e){throw console.error(e),e};var c=this["webpackJsonptwitter-frontend"]=this["webpackJsonptwitter-frontend"]||[],l=c.push.bind(c);c.push=t,c=c.slice();for(var s=0;s<c.length;s++)t(c[s]);var f=l;r()}([]);
|
||||
//# sourceMappingURL=runtime-main.c2d88949.js.map
|
||||
!function(e){function t(t){for(var n,o,i=t[0],c=t[1],l=t[2],f=0,d=[];f<i.length;f++)o=i[f],Object.prototype.hasOwnProperty.call(a,o)&&a[o]&&d.push(a[o][0]),a[o]=0;for(n in c)Object.prototype.hasOwnProperty.call(c,n)&&(e[n]=c[n]);for(s&&s(t);d.length;)d.shift()();return u.push.apply(u,l||[]),r()}function r(){for(var e,t=0;t<u.length;t++){for(var r=u[t],n=!0,o=1;o<r.length;o++){var c=r[o];0!==a[c]&&(n=!1)}n&&(u.splice(t--,1),e=i(i.s=r[0]))}return e}var n={},o={1:0},a={1:0},u=[];function i(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,i),r.l=!0,r.exports}i.e=function(e){var t=[];o[e]?t.push(o[e]):0!==o[e]&&{3:1,4:1,5:1}[e]&&t.push(o[e]=new Promise((function(t,r){for(var n="static/css/"+({}[e]||e)+"."+{3:"1f6bb621",4:"6512f3a3",5:"3aaab79d"}[e]+".chunk.css",a=i.p+n,u=document.getElementsByTagName("link"),c=0;c<u.length;c++){var l=(s=u[c]).getAttribute("data-href")||s.getAttribute("href");if("stylesheet"===s.rel&&(l===n||l===a))return t()}var f=document.getElementsByTagName("style");for(c=0;c<f.length;c++){var s;if((l=(s=f[c]).getAttribute("data-href"))===n||l===a)return t()}var d=document.createElement("link");d.rel="stylesheet",d.type="text/css",d.onload=t,d.onerror=function(t){var n=t&&t.target&&t.target.src||a,u=new Error("Loading CSS chunk "+e+" failed.\n("+n+")");u.code="CSS_CHUNK_LOAD_FAILED",u.request=n,delete o[e],d.parentNode.removeChild(d),r(u)},d.href=a,document.getElementsByTagName("head")[0].appendChild(d)})).then((function(){o[e]=0})));var r=a[e];if(0!==r)if(r)t.push(r[2]);else{var n=new Promise((function(t,n){r=a[e]=[t,n]}));t.push(r[2]=n);var u,c=document.createElement("script");c.charset="utf-8",c.timeout=120,i.nc&&c.setAttribute("nonce",i.nc),c.src=function(e){return i.p+"static/js/"+({}[e]||e)+"."+{3:"79deefcb",4:"ea7fc71b",5:"a9bd75b8"}[e]+".chunk.js"}(e);var l=new Error;u=function(t){c.onerror=c.onload=null,clearTimeout(f);var r=a[e];if(0!==r){if(r){var n=t&&("load"===t.type?"missing":t.type),o=t&&t.target&&t.target.src;l.message="Loading chunk "+e+" failed.\n("+n+": "+o+")",l.name="ChunkLoadError",l.type=n,l.request=o,r[1](l)}a[e]=void 0}};var f=setTimeout((function(){u({type:"timeout",target:c})}),12e4);c.onerror=c.onload=u,document.head.appendChild(c)}return Promise.all(t)},i.m=e,i.c=n,i.d=function(e,t,r){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},i.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(i.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)i.d(r,n,function(t){return e[t]}.bind(null,n));return r},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="/",i.oe=function(e){throw console.error(e),e};var c=this["webpackJsonptwitter-frontend"]=this["webpackJsonptwitter-frontend"]||[],l=c.push.bind(c);c.push=t,c=c.slice();for(var f=0;f<c.length;f++)t(c[f]);var s=l;r()}([]);
|
||||
//# sourceMappingURL=runtime-main.cf643d5e.js.map
|
||||
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue