text:
Q: Restrict access to login page if the user is already signin in React with JWT How can I restrict access to /login page (by manually entering the URL) after the user is already signed in?
I can now enter /login in the url and the user, even though it is already signed in and on the home page, can navigate to /login page.
I am using JWT, so when the user navigates to /login page, the token remains in the localStorage.
I've tried a hook in the /login component:
const history = useHistory()

useEffect(() => {
    const isToken = localStorage.getItem('user')
    if (isToken && isToken !== 'undefined') {
      history.push('/')
    }
}, [])

The token is set like this:
localStorage.setItem('user', JSON.stringify(response.data));

Now, when I try to go on the /login page, it seems that it wants to redirect, but crashes with:

TypeError: undefined is not iterable (cannot read property
Symbol(Symbol.iterator))

Please tell me what I'm missing or doing wrong

A: If you are using React Router, I would recommend using a Redirect. Also, make sure to clear the previous token in local storage when logging out
if (token) {
    return <Redirect to={{pathname: '/'}} />
}

A: In you Login component, you can check whether user exists or not. If so, just redirect it.

Rendering a Redirect will navigate to a new location. The new
location will override the current location in the history stack, like
server-side redirects (HTTP 3xx) do.

import { Redirect } from 'react-router-dom';

const Login = () => {

  const isLoggedIn = window.localStorage.getItem('user');

  if (isLoggedIn) <Redirect to="/" />

  return (
    // login page
  );

};

redpajama_set_name: RedPajamaStackExchange


As you approach the Ardanaiseig Hotel, you can feel the magic and lore of the Scottish highlands. Located on the shores of Loch Awe and in the shadow of Ben Cruachan, the land on which the hotel stands is steeped in local myths and legends. As you walk the halls of the manor, you can feel the hum of the magical energy that flows through it.
Originally designed by the prolific architect William Burn in 1834, Ardenaiseig is an excellent example of his signature Scottish Baronial style. The owners have done a great job preserving the authenticy of this traditional country manor with its grand entrance hall, antique furniture, and fine artwork. The guestrooms are also beautifully decorated to showcase the classic sophistication with a few bold twists. Each room provides magnificent views of the manicured gardens or loch. If you want a bit more privacy, you can also stay in the two-bedroom Rose cottage or the Boat Shed which is right on the water.
Ardanaiseig and its exceptional staff are the proud recipients of numerous awards, including the incredible restaurant. It has built a reputation for serving gourmet Scottish cuisine and is recognized as one of the finest dining options in the area.
The unspoiled tranquility and pristine beauty of Ardanaiseig Hotel almost feel surreal. As you walk through the doors, it seems as if you are transported back to a simpler time.


Comment on The Morning Hitlist!
VIP Track of the Week!
Comment on VIP Track of the Week!
The only place to be this morning is right here! Join @pandoratweets for the biggest hits, the hottest goss and a whole lot more!


text:
Q: Drupal 7 hide contentype permission in the admin->permission In the apigee it comes with content type article,basic page, image, video, Audio, t form a long list in the permission tab(admin->permisson), I need to hide those content type permission (article-create, edit,edit own, delete own, delete any) in the tab, because its no longer going to use.

A: Why do you want to hide those permissions?. I mean that configuration is available only for the administrator role. But the administrator could grant the permissions to any role you create,so, you shouldn't hide any configuration for the administrator.


A: I'd like to buy some Thai silk. Where should I go shopping? Could you recommend a store?
ไอด์ ไล้ค์ ถุ บ๊าย ซั้ม ไท้ ซิ้ลค์. แว้ร์ ชูล์ด ไอ โก๊ ช้อพพิง? คูล์ด หยุ เรคคอมเม้นด์ เดอะ สโต๋ร์?
B: There're many Thai silk stores nearby. But the one I know best is a little bit far from here. I can take you there if you like. Here's the name card of the store.
A: The name is familiar to me.
B: Yes, it's a quite famous one. There're many branches in Bangkok and in Chiang Mai.
A: Can we go there right now?
แคน วี โก๊ แดร์ ไร้ท์ หนาว?
B: Yes, we can surely go there. It's on Sukhumvit Road, but a little bit in the alley.
A: It's all right with me. Shall we go right now so that we'll have plenty of time to spend there?
อิทส์ ออล ไร้ท์ วิธ มี้. แชล วี โก๊ ไร้ท์ หนาว โซ แดท วีลล์ แฮ้ฟว์ เพล้นที ออฟ ไท้ม์ ถุ สเป๊นด์ แด๋ร์?
B: Here we are. The Thai silk store. You can spend as much time and money as you need to do.
เรามาถึงแล้ว ร้านผ้าไหม คุณสามารถใช้เวลาและเงินมากเท่าที่ต้องการ A: Wow! It's such a huge store!
ว้าว! อิทส์ ซัช-อะ ฮิ้วจ์ สโต๊ร์!
B: It's really is. There're many departments on both floors. There're not only silk materials but also ready-made silk clothes and silk products. There're also cotton products, handicrafts, bronze wares, lacquer wares, and other souvenir items.
A: Let's go to the silk department first. And then we go further to other departments.
B: Here's the silk department. This is all silk material. The ready-made clothes are upstairs.
A: There're so many colours and patterns. And they're so bright and attractive.
B: They really are. Would you like to but some?
เดย์ รี้แอลลี อ๊าร์. วูล์ด หยุ ไล้ค์ ถุ บ๊าย สัม?
1. I'd like to buy some Thai silk.
2. Where should I go shopping?
แว้ร์ ชูล์ด ไอ โก๊ ช้อพพิง?
3. Could you recommend the store?
คูล์ด หยุ เรคคอมเม้นด์ เดอะ สโต่ร์?
4. There're many Thai silk stores nearby.
5. But the one I know best is a little bit far from here.
6. I can take you there if you like.
7. Here's the name card of the store.
8. The name is familiar to me.
9. Yes, it's a quite famous one.
10. There're many branches in Bangkok and in Chiang Mai.
11. Can we go there right now?
12. Yes, we can surely go there.
13. It's on Sukhumvit Road, but a little bit in the alley.
14. It's all right with me.
15. Shall we go right now so that we'll have plenty of time to spend there?
แชล วี โก๊ ไร้ท์ หนาว โซ แดท วีลล์ แฮ้ฟว์ เพล้นที อ่อฟ ไท้ม์ ถุ สเป๊นด์ แด๋ร์?
16. Here we are. The Thai silk store.
17. You can spend as much time and money as you need to do.
20. There're many departments on both floors.
21. There're not only silk material, but also ready¬made silk clothes and silk products.
22. There're also cotton products, handicrafts, bronze wares, lacquer wares, and other souvenir items.
23. Let's go to the silk department first.
24. And then we go further to other departments.
25. Here's the silk department.
26. This is all silk material.
27. The ready-made clothes are upstairs.
28. There're so many colours and patterns.
29. And they're so bright and attractive.
31. Would you like to buy some?
วูล์ด หยุ ไล้ค์ ถุ บาย สัม?
1. There're not only silk material, but also ready¬made silk clothes and silk products.
2. He's not only rich but also very kind.
3. It's not only beautiful but also cheap.
1. It's not only beautiful but cheap too.
2. It's not only beautiful but cheap as well.
1. It's such a huge store!
2. They're such nice people!
3. You're such a kind person!
1. The store is so huge!
เดอะ สโต๊ร์ อิซ โซ้ ฮิ้วจ!
A: It's a very huge store.
B: Yes, it's such a huge store!
เย้ซ, อิทส์ ซั้ช-อะ ฮิ้วจ์ สโต๊ร์!
1. A: He's a very kind person.
B: Yes, he's such a kind person!
เย้ซ, ฮีซ์ ซั้ช-อะ ไคน์ด์ เพ้อร์ซัน!
2. A: She's a very bright student.
B: Yes, she's such a bright student!
เย้ซ, ชีซ์ ซั้ช-อะ ไบร๊ท์ สติ๊วเดนท์!
3. A: They're very diligent teachers.
B: Yes, they're such diligent teachers!
เย้ซ, เดย์เออร์ ซั้ช ดิ๊ลลิเจนท์ ที้ชเชอร์ซ์!
4. A: They're very expensive products.
B: Yes, they're such expensive products!
เย้ซ, เดย์เออร์ ซั้ช เอกซ์เพ้นสิฟว์ พร้อดดัคท์ส์!
5. A: She's a very beautiful girl.
B: Yes, she's such a beautiful girl!
เย้ซ, ชีซ์ ซั้ช-อะ บิ๊วทิฟุล เกิ๊ร์ล!
6. A: They're very nice people.
B: Yes, they're such nice people!
เย้ซ, เดย์เออร์ ซั้ช ไน้ซ์ พี้เพิล!
7. A: It's a huge Buddha image.
B: Yes, it's such a huge Buddha image!
เย้ซ, อิทส์ ซั้ช-อะ ฮิ้วจ์ บุ๊ดดา อิ๊มเหมจ!
8. A: It's a very great collection.
B: Yes, it's such a great collection!
เย้ซ, อิทส์ ซั้ช-อะ เกร๊ท คอลเล้คชัน!
9. A: They're very attractive mural paintings.
B: Yes, they're such attractive mural paintings!
เย้ซ, เดย์เออร์ ซั้ช แอทแทร้คทิฟว์ มิ้วรัล เพ้นทิงซ์!
10. A: They're very good silk products.
B: Yes, they're such good silk products!
เย้ซ, เดย์เออร์ ซั้ช กูด ซิ้ลค์ พร้อดดัคท์ส์!
A: The store is very huge.
B: Yes, it's so huge!
1. A: The teacher is very kind.
B: Yes, he's so kind!
2. A: The student is very bright.
B: Yes, he's so bright!
3. A: The teachers are very diligent.
B: Yes, they're so diligent!
4. A: The girl is very beautiful.
5. A: The products are very expensive.
B: Yes, they're so expensive!
6. A: These people are very nice.
B: Yes, they're so nice!
7. A: The collection of Buddha images is very great.
B: Yes, it's so great!
8. A: This Buddha image is very huge.
9. A: These mural paintings are very attractive.
B: Yes, they're so attractive!
10. A: These bronze wares are very good.
B: Yes, they're so good!
A: There're silk materialร and there're silk clothes.
B: There're not only silk materials, but also silk clothes.
1. A: There're silk products, and there're cotton products.
B: There're not only silk products, but also cotton products.
2. A: He's very kind, and he's very rich.
B: He's not only very kind, but also very rich.
3. A: She's very beautiful, and she's very in¬ telligent.
B: She's not only very beautiful, but also very intelligent.
4. A: The lesson today is very long, and it's very boring.
B: The lesson today is not only very long, but also very boring.
5. A: The test is difficult and it's long.
B: The test is not only difficult, but also long.
6. A: We're very hungry, and we're very thirsty.
B: We're not only very hungry, but also very thirsty.
7. A: The ready-made clothes are beautiful, and the prices are reasonable.
B: The ready-made clothes are not only beautiful, but also reasonable.
to buy some ready-made silk clothes.
B: I'd like to buy not only some silk clothes, but also some ready-made silk clothes.


Welcome to 9 East Deep Creek Road, Monkland. Priced to sell this neat and tidy home is sure to impress!
This low maintenance property would make a fantastic residence or smart investment, don't miss your chance! Phone now to arrange you're private viewing!


Since their formation in late 2012, Conquer Divide have managed to create a unique, modern and ever apparent dichotomy of beautiful elegance and intense aggression that intertwines seamlessly with one another. The music certainly doesn't spare any dynamics, with the album taking the listener on a roller coaster ride of divergent stylistic qualities representing each of their musical tastes. In their short time together, they have managed to capture attention and gain respect from their ever growing fan base and critics alike.
It's not exactly a secret that the group is comprised of all girls, but you wouldn't know simply by listening to one of their songs. However, don't let their image fool you. "We are all girls, and you cant hide that, but we want people to focus more on the quality of the music." drummer Tamara reveals. "It wasn't an easy thing finding girls who not only were passionate about this type of music, but could play it well." So after years of looking in the States, they were forced to look all over the world, auditioning over 200 girls. They are subsequently based in two countries, the United States and England, but this hasn't slowed them down any. Suzie, vocalist, admits "We were especially lucky to find our guitarist Izzy, who shares the same vision we do. We found out quickly how much of a rarity dedicated and talented female guitar players are." The band concluded that they couldn't let distance be a factor when putting the lineup together. "When I was contacted by the girls I instantly knew it was perfect for me, not everyone gets the chance to work with such like-minded musicians." Izzy adds.
"We wanted to stay true to our roots" explains Kristen, guitarist. "Everything we've written comes from a real life experience. Music, like any art medium, has always been a form of catharsis for us, its all about trying to take something negative that happened in your life and turn it into something positive. And we've had a lot of pent up anger to get out on this record. But we did our best to move past those issues and turn them into something for the greater good, because, I think, the whole idea is, if I can't heal from my art, how can you heal from it?." "Yeah, we've poured our hearts into this record and we really hope people can connect with it on some level" Sarah adds.
"We really wanted to take our time on our first album, and because of that, we've grown tremendously as songwriters. So this album really reflects where we've been, where we are and where we are headed" Kristen concludes. With their album still in the works as well as an upcoming music video, the girls wont be battling distance for much longer. The members plan to converge at a central location this summer to prepare for touring. We are super excited to see what the future has in store for us" Izzy exclaims.


This postcard is a bit delayed but it relates to a museum which just blew me away during my time in America. Following on from Carlisle, PA I traveled by train to New York City. As this was my first visit I tried to see as many museums in as short an amount of time as possible. My first stop was the American Museum of Natural History which is on the Upper West Side, looking out over Central Park. The entrance (above) is almost overwhelming with its dinosaurs, murals and quotes from Roosevelt (after whom the hall is named).
The Museum was founded in 1869 and is famous for its use of habitat dioramas. The most notable example of this is the Akeley Hall of African Mammals which opened in 1936. I am always a bit wary of dioramas, as in the UK outdated shop dummy dioramas were the stuff of childhood comedy or terror. However, the hall is named for Carl Akeley (1864-1926), a man who took taxidermy and dioramas to the level of an art form. It is difficult to make out in these photographs, but standing in front of these scenes you feel as though you have been transported to the location in question. Many of the observations were made through expeditions, and the dioramas also convey the strength of emotion which these explorers must have felt upon watching animals in the wild. You can find out more about Carl Akeley via Milgrom's infinitely readable and informative (2011) 'Still Life: Adventures in Taxidermy'.
It becomes tricky when this technique is applied to human beings. Perhaps more worryingly when it is applied to certain human beings and not to others. This image of a Tibetan couple in Lhasa with the Potala in the background is pure Shangri-La (see Dr Clare Harris' 'The Museum on the Roof of the World' for more on the way that Tibet has been represented in museums). The museum does have a slightly retro feel but I wondered whether every audience member picked up on the significance of the timelag. The political consequences of presenting frozen images of 'exotic' cultures needs not a blog post but several books to discuss and I'll try to add some references in the comments section.
The animal collections are also challenging. Some species were being killed for taxidermy at a time when they were under extreme pressure. Carl Akeley himself realised this and, after seeing gorillas in the wild, actually established a reserve in Virunga. The Museum is well aware of its commitment to the preservation of the planet, with the Roosevelt quote 'The nation behaves well if it treats the natural resources as assets which it must turn over to the next generation increased; and not impaired in value' adorning the entrance hall.
Overall its slightly retro feel was a dream come true to a museum professional. The dioramas are both popular and an important record of how we have thought about and represented our world. Yet the timelag in representation does cause problems in places. No doubt the staff grapple with these complexities on a daily basis, and it will be interesting to see how reflexive museology and anthropology translates to the galleries over the coming decades.
This entry was posted in Interpretation, Natural History and tagged American Museum of Natural History; Carl Akeley, dioramas. Bookmark the permalink.
The big challenge I see is how to inform the museum visitor that these diorama displays have changed from "views of how things are" into "views of days gone by." Search YouTube for "Revisiting Akeley's Gorillas" for a video by the AMNH that addresses this. In the days before TV and color movies these dioramas were used to show people how things were in the world, now they have become artifacts. I'm often surprised by how long ago they were constructed. Sealed in their glass enclosures they can appear timeless, but when I'm visiting my local natural history museum I try to be sure to inform my guests that these are really "windows into the past" that have preserved a view that has changed quite a bit between then and now. The artists that constructed them often took pains to make an accurate, if artistic, recording of their world. As such they have become valuable historic records, but need to be re-labeled to reflect that.
That's a great point Brian it was only when I started to look at the ethnographic collections that I really became aware of them as historic items. That was only because I have anthropological training. I would love to see an art installation where these original locations are compared to the same views today.


Released by Spettro Records. Ltd to 500 worldwide.
Rome was, of course, the pulsating heart of Italian library music – it is the place where tv and movies are made, so editors and musicians tend to gather there. But we must not forget what was happening, at the same time, in Milan – where there was a very active music industry, but leaning more on the pop and jazz side. The Roman style was more connected to the classic and orchestral tradition, but the musicians in Milan adopted a more urban and international approach, in the vein of contemporary pop with some US jazz-funk instrumental deviations. It's not a coincidence that among the most active artists in the library world we find people who – in the Seventies and Eighties – played in many records by Mina, Fabrizio De André, Gaber, Branduardi and Fausto Papetti. The quartet featuring pianist Oscar Rocchi, bassist Gigi Cappellotto, drummer Andy Surdi and guitarist Ernesto Verardi is behind many great library music albums, most of which released via the labels owned by Edizioni Minstrel. "Horoscope" was released in 1978, in a few hundred out of commerce copies, credited to Modern Sound Quartet (one of the many monikers used by the band), on Ring label. This album is a manifesto of the band's style, using the concept of horoscope and zodiac signs to lay down a dozen of tracks perfectly reflecting their age: a good dose of disco ("Lion", "Aries", "Sagittarius", "Scorpion", "Gemini"), a hint of melodic pop ("Virgin", "Balance"), a touch of prog ("Fishes", "Cancer"), some light jazz-funk fusion ("Capricorn") and b-movie atmospheres ("Acquarius", "Taurus").